xichen01 opened a new pull request, #6776:
URL: https://github.com/apache/ozone/pull/6776

   ## What changes were proposed in this pull request?
   Add the datanode dimension for the `GetBlock`, `PutBlock`, `WriteChunk` and 
`ReadChunk`, Since the Since a cluster has a very large number of Datanodes, if 
you export metrics for all Datanodes, this will generate a very large number of 
metrics, so this adds a `TopNMetrics` type, which will only display information 
about the Datanodes with the highest latency.
   
   With this Metrics, we should be able to quickly find out if a Datanode is 
failing (for read operations, we can confirm directly with the Metrics `Tag: 
name`, for write operations, we need to combine it with the `Pipeline` 
information, in the Metrics for write operations, `Tag: name` is the Datanode 
UUID of the Pipeline's leader).
   
   ## What is the link to the Apache JIRA
   
   ## Example
   Configuration
   ```xml
     <property>
       
<name>ozone.xceiver.client.top.metrics.latency.record.threshold.ms.key</name>
       <value>1, 10</value>
     </property>
     <property>
       <name>ozone.xceiver.client.top.metrics.latency.record.count.key</name>
       <value>5</value>
     </property>
   ```
   
   Metrics
   
   ```bash
   [root@VM-7-9-centos ~]$ curl -s http://127.0.0.1:9878/prom | grep -v '#' | 
grep -i top | grep top
   
xceiver_client_metrics_put_block_exceed10_ms_count_top_n{top="1",name="2384b4cc-6808-489c-a14e-0781a6cbeb5d",hostname="VM-7-9-centos"}
 1
   
xceiver_client_metrics_put_block_exceed1_ms_count_top_n{top="1",name="2384b4cc-6808-489c-a14e-0781a6cbeb5d",hostname="VM-7-9-centos"}
 13
   
xceiver_client_metrics_put_block_exceed1_ms_count_top_n{top="2",name="99ce0d5a-0c29-49b5-94b5-cae68f8bdc39",hostname="VM-7-9-centos"}
 9
   
xceiver_client_metrics_write_chunk_exceed10_ms_count_top_n{top="1",name="2384b4cc-6808-489c-a14e-0781a6cbeb5d",hostname="VM-7-9-centos"}
 1
   
xceiver_client_metrics_write_chunk_exceed1_ms_count_top_n{top="1",name="2384b4cc-6808-489c-a14e-0781a6cbeb5d",hostname="VM-7-9-centos"}
 13
   
xceiver_client_metrics_write_chunk_exceed1_ms_count_top_n{top="2",name="99ce0d5a-0c29-49b5-94b5-cae68f8bdc39",hostname="VM-7-9-centos"}
 9
   ```
   
   ## How was this patch tested?
   existing test
   


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