[ 
https://issues.apache.org/jira/browse/HDFS-16406?focusedWorklogId=723370&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-723370
 ]

ASF GitHub Bot logged work on HDFS-16406:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Feb/22 02:07
            Start Date: 09/Feb/22 02:07
    Worklog Time Spent: 10m 
      Work Description: ferhui merged pull request #3847:
URL: https://github.com/apache/hadoop/pull/3847


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 723370)
    Time Spent: 1h 50m  (was: 1h 40m)

> DataNode metric ReadsFromLocalClient does not count short-circuit reads
> -----------------------------------------------------------------------
>
>                 Key: HDFS-16406
>                 URL: https://issues.apache.org/jira/browse/HDFS-16406
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: secfree
>            Assignee: secfree
>            Priority: Minor
>              Labels: metrics, pull-request-available
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> The following test case failed. 
> {code}
>   @Test
>   public void testNodeLocalMetrics() throws Exception {
>     Assume.assumeTrue(null == DomainSocket.getLoadingFailureReason());
>     Configuration conf = new HdfsConfiguration();
>     conf.setBoolean(HdfsClientConfigKeys.Read.ShortCircuit.KEY, true);
>     TemporarySocketDirectory sockDir = new TemporarySocketDirectory();
>     DomainSocket.disableBindPathValidation();
>     conf.set(DFSConfigKeys.DFS_DOMAIN_SOCKET_PATH_KEY,
>         new File(sockDir.getDir(),
>             "testNodeLocalMetrics._PORT.sock").getAbsolutePath());
>     MiniDFSCluster cluster = new 
> MiniDFSCluster.Builder(conf).numDataNodes(1).build();
>     try {
>       cluster.waitActive();
>       FileSystem fs = cluster.getFileSystem();
>       Path testFile = new Path("/testNodeLocalMetrics.txt");
>       long file_len = 10;
>       DFSTestUtil.createFile(fs, testFile, file_len, (short)1, 1L);
>       DFSTestUtil.readFile(fs, testFile);
>       List<DataNode> datanodes = cluster.getDataNodes();
>       assertEquals(datanodes.size(), 1);
>       DataNode datanode = datanodes.get(0);
>       MetricsRecordBuilder rb = getMetrics(datanode.getMetrics().name());
>       // Write related metrics
>       assertCounter("WritesFromLocalClient", 1L, rb);
>       // Read related metrics
>       assertCounter("ReadsFromLocalClient", 1L, rb); // failed here
>     } finally {
>       if (cluster != null) {
>         cluster.shutdown();
>       }
>     }
>   }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to