HDFS-11883: [SPS] : Handle NPE in BlockStorageMovementTracker when dropSPSWork() called. Contributed by Surendra Singh Lilhore.
This commit is contained in:
parent
5ce332dc9a
commit
e53f89ccc3
|
@ -88,13 +88,17 @@ public class BlockStorageMovementTracker implements Runnable {
|
|||
long trackId = result.getTrackId();
|
||||
List<Future<BlockMovementResult>> blocksMoving = moverTaskFutures
|
||||
.get(trackId);
|
||||
if (blocksMoving == null) {
|
||||
LOG.warn("Future task doesn't exist for trackId " + trackId);
|
||||
continue;
|
||||
}
|
||||
blocksMoving.remove(future);
|
||||
|
||||
List<BlockMovementResult> resultPerTrackIdList =
|
||||
addMovementResultToTrackIdList(result);
|
||||
|
||||
// Completed all the scheduled blocks movement under this 'trackId'.
|
||||
if (blocksMoving.isEmpty()) {
|
||||
if (blocksMoving.isEmpty() || moverTaskFutures.get(trackId) == null) {
|
||||
synchronized (moverTaskFutures) {
|
||||
moverTaskFutures.remove(trackId);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue