[
https://issues.apache.org/jira/browse/HDFS-16406?focusedWorklogId=723371&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-723371
]
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 commented on pull request #3847:
URL: https://github.com/apache/hadoop/pull/3847#issuecomment-1033261159
@secfree Thanks for your contribution. @aajisaka Thanks for your review!
Merged
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 723371)
Time Spent: 2h (was: 1h 50m)
> 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: 2h
> 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: [email protected]
For additional commands, e-mail: [email protected]