[
https://issues.apache.org/jira/browse/HDFS-16406?focusedWorklogId=702738&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-702738
]
ASF GitHub Bot logged work on HDFS-16406:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 01/Jan/22 16:02
Start Date: 01/Jan/22 16:02
Worklog Time Spent: 10m
Work Description: secfree opened a new pull request #3847:
URL: https://github.com/apache/hadoop/pull/3847
### Description of PR
1. ReadsFromLocalClient counts short-circuit reads
### How was this patch tested?
1. UT
### For code changes:
- [x] Does the title or this PR starts with the corresponding JIRA issue id
(e.g. 'HADOOP-17799. Your PR title ...')?
- [ ] Object storage: have the integration tests been executed and the
endpoint declared according to the connector-specific documentation?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`,
`NOTICE-binary` files?
--
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: 702738)
Remaining Estimate: 0h
Time Spent: 10m
> 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: 10m
> 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]