Description
The problem with the ThreadGroup.activeCount() method is that the method is only a very rough estimate, and in reality returns the total number of threads in the thread group as opposed to the threads actually running.
In some DNs, we saw this to return 50~ for a long time, even though the actual number of DataXceiver threads was next to none.
This is a big issue as we use the xceiverCount to make decisions on the NN for choosing replication source DN or returning DNs to clients for R/W.
The plan is to reuse the DataNodeMetrics.dataNodeActiveXceiversCount value which only accounts for actual number of DataXcevier threads currently running and thus represents the load on the DN much better.
Attachments
Attachments
Issue Links
- depends upon
-
HDFS-10469 Add number of active xceivers to datanode metrics
- Resolved
- is related to
-
HDFS-14292 Introduce Java ExecutorService to DataXceiverServer
- Patch Available
- relates to
-
HDFS-14830 The calculation of DataXceiver count is not accurate
- Resolved