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