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

ASF GitHub Bot commented on HADOOP-9946:
----------------------------------------

aajisaka commented on PR #5002:
URL: https://github.com/apache/hadoop/pull/5002#issuecomment-1290507496

   > But I have a little different through. Maybe the Map<String, MetricsSink> 
allSinks is only used to store the registered MetricsSink and sinks is used to 
store all the MetricsSinkAdapter.
   
   Good point. I suppose we can simplify `allSinks` because it's only used to 
avoid duplicate sink names. `Set<String>` maybe sufficient instead of 
`Map<String, MetricsSink>`.
   
   ```
       if (allSinks.containsKey(name)) {
         LOG.warn("Sink "+ name +" already exists!");
         return sink;
       }
   ```




> NumAllSinks metrics shows lower value than NumActiveSinks
> ---------------------------------------------------------
>
>                 Key: HADOOP-9946
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9946
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 2.1.0-beta
>            Reporter: Akira Ajisaka
>            Assignee: Ashutosh Gupta
>            Priority: Major
>              Labels: BB2015-05-TBR, metrics, pull-request-available
>             Fix For: 3.4.0
>
>         Attachments: HADOOP-9946, HADOOP-9946.02.patch, HADOOP-9946.patch
>
>
> In my hadoop cluster (trunk), output metrics file is as follows:
> {code}
> $ less /tmp/nodemanager-metrics.out
> 1377894554661 metricssystem.MetricsSystem: Context=metricssystem, 
> Hostname=hadoop, NumActiveSources=8, NumAllSources=8, NumActiveSinks=1, 
> NumAllSinks=0, Sink_fileNumOps=0, ...
> {code}
> NumAllSinks should be equal to or greater than NumActiveSinks.



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

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

Reply via email to