You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/10/25 12:53:21 UTC

[GitHub] [hadoop] aajisaka commented on pull request #5002: HADOOP-9946. NumAllSinks metrics shows lower value than NumActiveSinks

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;
       }
   ```


-- 
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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org