You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ji...@apache.org on 2014/10/17 23:45:03 UTC

[16/34] git commit: HDFS-7066. LazyWriter#evictBlocks misses a null check for replicaState. (Contributed by Xiaoyu Yao)

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

Conflicts:
	hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-6581.txt


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/6906ecce
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/6906ecce
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/6906ecce

Branch: refs/heads/branch-2
Commit: 6906eccec48e3462d17e81e779c3f59d07b43468
Parents: b8a2eb7
Author: arp <ar...@apache.org>
Authored: Mon Sep 15 15:28:17 2014 -0700
Committer: Jitendra Pandey <Ji...@Jitendra-Pandeys-MacBook-Pro-4.local>
Committed: Fri Oct 17 13:42:01 2014 -0700

----------------------------------------------------------------------
 .../hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java       | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/6906ecce/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java
index 2b16a65..44a91c1 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java
@@ -2410,6 +2410,10 @@ class FsDatasetImpl implements FsDatasetSpi<FsVolumeImpl> {
         LazyWriteReplicaTracker.ReplicaState replicaState =
             lazyWriteReplicaTracker.getNextCandidateForEviction();
 
+        if (replicaState == null) {
+          break;
+        }
+
         if (LOG.isDebugEnabled()) {
           LOG.debug("Evicting block " + replicaState);
         }