[
https://issues.apache.org/jira/browse/HDFS-17360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17811833#comment-17811833
]
ASF GitHub Bot commented on HDFS-17360:
---------------------------------------
huangzhaobo99 commented on PR #6505:
URL: https://github.com/apache/hadoop/pull/6505#issuecomment-1914509805
> Thanks for your contribution, but I don't quite understand why this metric
needs to be added to jmx. If you only want to obtain the blocks that are
frequently accessed during a certain time period, is it enough to open
CLIENT_TRACE_LOG on the datanode? Then we can process and analyze the audit
logs to obtain the information we need.
@zhangshuyan0, Thanks for your review.
1. Open CLIENT_ TRACE_ LOG, requires manual aggregation.
2. The current log related to read is at the debug level, while the log
related to write is at the info level. Perhaps due to too many logs, it
defaults to the debug level. However, there are relatively few write requests,
and the info level will not cause log explosions.
```java
if ((clientTraceFmt != null) && CLIENT_TRACE_LOG.isDebugEnabled()) {
final long endTime = System.nanoTime();
CLIENT_TRACE_LOG.debug(String.format(clientTraceFmt, totalRead,
initialOffset, endTime - startTime));
}
```
3. Record these blockids through metrics and export them to jmx through
maps, very easy to locate block. ("DFSClientId" may also need to be recorded)
> Record the number of times a block is read during a certain time period.
> ------------------------------------------------------------------------
>
> Key: HDFS-17360
> URL: https://issues.apache.org/jira/browse/HDFS-17360
> Project: Hadoop HDFS
> Issue Type: New Feature
> Reporter: huangzhaobo
> Assignee: huangzhaobo
> Priority: Major
> Labels: pull-request-available
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]