Neilxzn opened a new pull request #3494:
URL: https://github.com/apache/hadoop/pull/3494


   
   ### Description of PR
   https://issues.apache.org/jira/browse/HDFS-16242
   JournalMetrics should add JournalId MetricTag to distinguish different 
nameservice journal metrics  when JournalNode use ganglia sink or  prometheus 
sink.
   
   JMX
   
   Before this patch, journal' jmx :
   
   // jmx json
       {
       "name" : "Hadoop:service=JournalNode,name=Journal-nntest1",
       "Syncs60sNumOps" : 0,
       ...
       },
       {
      "name" : "Hadoop:service=JournalNode,name=Journal-nntest2",
      "Syncs60sNumOps" : 0,
      ... 
      }
    
   
   After this patch, journal' jmx :
   
    
   
   // jmx json
       {
       "name" : "Hadoop:service=JournalNode,name=Journal-nntest1",
       "tag.JournalId" : "nntest1",  // add this tag
       "Syncs60sNumOps" : 0,
      ...
       },
       {
      "name" : "Hadoop:service=JournalNode,name=Journal-nntest2", 
       "tag.JournalId" : "nntest2",
      "Syncs60sNumOps" : 0,
     ... 
       }
    
   
   PrometheusSink
   
   Before this patch, journal' prometheus export :
   
    
   
   journal_node_syncs60s_num_ops{context="dfs",hostname="host"} 2
   After this patch, journal' prometheus export :
   
   
journal_node_syncs60s_num_ops{context="dfs",journalid="nntest2",hostname="host"}
 2
   
journal_node_syncs60s_num_ops{context="dfs",journalid="nntest1",hostname="host"}
 75
   
   ### How was this patch tested?
   add test testJournalMetricTags
   
   ### For code changes:
   add JournalMetrics$getJournalId
   
   


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