haiyang1987 edited a comment on pull request #3471:
URL: https://github.com/apache/hadoop/pull/3471#issuecomment-926538825


   @ferhui Thanks for your reply!
   There are two problems:
   1.Current code error MetricsName, unable to get actual metrics,e.g 
TotalPacketsReceived,TotalPacketsSlowWriteToMirror,TotalPacketsSlowWriteToDisk,TotalPacketsSlowWriteToOsCache
 
   
         MetricsRecordBuilder dnMetrics = 
getMetrics(datanode.getMetrics().name());
         assertTrue("More than 1 packet received",
             getLongCounter("TotalPacketsReceived", dnMetrics) > 1L); 
         assertTrue("More than 1 slow packet to mirror",
             getLongCounter("TotalPacketsSlowWriteToMirror", dnMetrics) > 1L);
         assertCounter("TotalPacketsSlowWriteToDisk", 1L, dnMetrics);
         assertCounter("TotalPacketsSlowWriteToOsCache", 0L, dnMetrics);
   2.Current, we need to get the first or second DataNode of the pipline that 
writes data to get ReceivePacketSlowMetrics of the DataNode
   
   ```
   List<DataNode> datanodes = cluster.getDataNodes();
   DataNode datanode = datanodes.get(0);
   //If the datanode obtained here is the third node of the pipline to write 
data, such as PacketsSlowWriteToMirror  unable to get 
   MetricsRecordBuilder dnMetrics = getMetrics(datanode.getMetrics().name());  
   ```


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to