Details
Description
In ThrottledAsyncChecker class,it members of the completedChecks is WeakHashMap, its definition is as follows:
this.completedChecks = new WeakHashMap<>();
and one of its uses is as follows in schedule method:
if (completedChecks.containsKey(target))
after "completedChecks.containsKey(target)", may be happen garbage collection, and result may be null.
the solution is:
this.completedChecks = new ReferenceMap(1, 1);
or
this.completedChecks = new HashMap<>();
Attachments
Attachments
Issue Links
- is duplicated by
-
HDFS-14071 DataNode runs async disk checks maybe throws NullPointerException In ThrottledAsyncChecker.java
- Resolved
-
HDFS-14072 DataNode runs async disk checks maybe throws NullPointerException, and DataNode failed to register to NameSpace.
- Resolved
-
HDFS-14073 DataNode runs async disk checks maybe throws NullPointerException, and DataNode failed to register to NameSpace.
- Resolved
-
HDFS-14503 ThrottledAsyncChecker throws NPE during block pool initialization
- Resolved