GeorryHuang commented on a change in pull request #1292: HBASE-23994:Add WebUI
to Canary
URL: https://github.com/apache/hbase/pull/1292#discussion_r399784764
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/tool/CanaryTool.java
##########
@@ -274,16 +303,50 @@ public void publishReadTiming(String znode, String
server, long msTime) {
private Map<String, LongAdder> perTableReadLatency = new HashMap<>();
private LongAdder writeLatency = new LongAdder();
private final Map<String, List<RegionTaskResult>> regionMap = new
ConcurrentHashMap<>();
+ private Map<ServerName, LongAdder> perServerFailuresCount = new
ConcurrentHashMap<>();
Review comment:
> Declare as ConcurrentMap?
I do this for the following reasons:
1. At the beginning of the sniffing, we will clear the Map
2. Only Failures Server or Failures table will put an element into the map
3. The sniffing process is concurrent with multiple threads
I do n’t know if I ’m doing it right. If not, any suggestions?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services