[ 
https://issues.apache.org/jira/browse/HDFS-16917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17692410#comment-17692410
 ] 

ASF GitHub Bot commented on HDFS-16917:
---------------------------------------

rdingankar commented on code in PR #5397:
URL: https://github.com/apache/hadoop/pull/5397#discussion_r1115082559


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java:
##########
@@ -1122,6 +1124,7 @@ public void copyBlock(final ExtendedBlock block,
       datanode.metrics.incrBytesRead((int) read);
       datanode.metrics.incrBlocksRead();
       datanode.metrics.incrTotalReadTime(duration);
+      datanode.metrics.addReadTransferRateMBs(DFSUtil.transferRateMBs(read, 
duration));

Review Comment:
   updated to log for cases when we get unexpected data.
   1) Bytes read is negative
   2) Duration is negative or 0.
   Since we are logging these cases not emitting the data to metrics.





> Add transfer rate quantile metrics for DataNode reads
> -----------------------------------------------------
>
>                 Key: HDFS-16917
>                 URL: https://issues.apache.org/jira/browse/HDFS-16917
>             Project: Hadoop HDFS
>          Issue Type: Task
>          Components: datanode
>            Reporter: Ravindra Dingankar
>            Priority: Minor
>              Labels: pull-request-available
>
> Currently we have the following metrics for datanode reads.
> |BytesRead
> BlocksRead
> TotalReadTime|Total number of bytes read from DataNode
> Total number of blocks read from DataNode
> Total number of milliseconds spent on read operation|
> We would like to add a new quantile metric calculating the transfer rate for 
> datanode reads.
> This will give us a distribution across a window of the read transfer rate 
> for each datanode.
> Quantiles for transfer rate per host will help in identifying issues like 
> hotspotting of datasets as well as finding repetitive slow datanodes.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
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