hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject git commit: HDFS-7066. LazyWriter#evictBlocks misses a null check for replicaState. (Contributed by Xiaoyu Yao)
Date Mon, 15 Sep 2014 22:29:06 GMT
Repository: hadoop
Updated Branches:
  refs/heads/HDFS-6581 fdf0542d8 -> a4dcbaa33


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


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

Branch: refs/heads/HDFS-6581
Commit: a4dcbaa33255cd1dd8d6c54763f55486c9e4317c
Parents: fdf0542
Author: arp <arp@apache.org>
Authored: Mon Sep 15 15:28:17 2014 -0700
Committer: arp <arp@apache.org>
Committed: Mon Sep 15 15:28:17 2014 -0700

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-6581.txt            | 3 +++
 .../hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java       | 4 ++++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/a4dcbaa3/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-6581.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-6581.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-6581.txt
index 346f912..0877636 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-6581.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-6581.txt
@@ -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)
+

http://git-wip-us.apache.org/repos/asf/hadoop/blob/a4dcbaa3/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 6366a4f..23753bd 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
@@ -2331,6 +2331,10 @@ class FsDatasetImpl implements FsDatasetSpi<FsVolumeImpl> {
         LazyWriteReplicaTracker.ReplicaState replicaState =
             lazyWriteReplicaTracker.getNextCandidateForEviction();
 
+        if (replicaState == null) {
+          break;
+        }
+
         if (LOG.isDebugEnabled()) {
           LOG.debug("Evicting block " + replicaState);
         }


Mime
View raw message