HDFS-7066. LazyWriter#evictBlocks misses a null check for replicaState. (Contributed by Xiaoyu Yao)

This commit is contained in:
arp 2014-09-15 15:28:17 -07:00
parent fdf0542d8e
commit a4dcbaa332
2 changed files with 7 additions and 0 deletions

View File

@ -44,3 +44,6 @@
HDFS-6978. Directory scanner should correctly reconcile blocks on RAM
disk. (Arpit Agarwal)
HDFS-7066. LazyWriter#evictBlocks misses a null check for replicaState.
(Xiaoyu Yao via Arpit Agarwal)

View File

@ -2331,6 +2331,10 @@ private void evictBlocks() throws IOException {
LazyWriteReplicaTracker.ReplicaState replicaState =
lazyWriteReplicaTracker.getNextCandidateForEviction();
if (replicaState == null) {
break;
}
if (LOG.isDebugEnabled()) {
LOG.debug("Evicting block " + replicaState);
}