HDFS-14074. DataNode runs async disk checks maybe throws NullPointerException, and DataNode failed to register to NameSpace. Contributed by guangyi lu.
(cherry picked from commit 645d67bc4f4e29d10ef810386c89e6a7c8c61862) (cherry picked from commit d5ecca1d4ca2b567167402bf8745fb2417bbf624)
This commit is contained in:
parent
4507c2f3a5
commit
529d0955f5
@ -123,8 +123,8 @@ public Optional<ListenableFuture<V>> schedule(Checkable<K, V> target,
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
if (completedChecks.containsKey(target)) {
|
||||
final LastCheckResult<V> result = completedChecks.get(target);
|
||||
final LastCheckResult<V> result = completedChecks.get(target);
|
||||
if (result != null) {
|
||||
final long msSinceLastCheck = timer.monotonicNow() - result.completedAt;
|
||||
if (msSinceLastCheck < minMsBetweenChecks) {
|
||||
LOG.debug("Skipped checking {}. Time since last check {}ms " +
|
||||
|
Loading…
x
Reference in New Issue
Block a user