Repository: hadoop
Updated Branches:
  refs/heads/branch-2.7 3249c3ce5 -> b2bc72a05


HDFS-8850. VolumeScanner thread exits with exception if there is no block pool 
to be scanned but there are suspicious blocks. (Colin Patrick McCabe via yliu)
(cherry picked from commit d2b941f94a835f7bdde7714d21a470b505aa582b)

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


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

Branch: refs/heads/branch-2.7
Commit: b2bc72a0513fa3a708d9b98a481d03fa10ce533a
Parents: 3249c3c
Author: Kihwal Lee <kihwal@actfamous-lm.(none)>
Authored: Fri Oct 2 14:59:29 2015 -0500
Committer: Kihwal Lee <kihwal@actfamous-lm.(none)>
Committed: Fri Oct 2 14:59:29 2015 -0500

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt             |  4 ++++
 .../hadoop/hdfs/server/datanode/VolumeScanner.java      | 12 +++++++-----
 2 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/b2bc72a0/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt 
b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index acdb531..aa348b2 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -53,6 +53,10 @@ Release 2.7.2 - UNRELEASED
     HDFS-9106. Transfer failure during pipeline recovery causes permanent
     write failures (kihwal)
 
+    HDFS-8850. VolumeScanner thread exits with exception if there is no block
+    pool to be scanned but there are suspicious blocks. (Colin Patrick McCabe
+    via yliu)
+
 Release 2.7.1 - 2015-07-06
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b2bc72a0/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/VolumeScanner.java
----------------------------------------------------------------------
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/VolumeScanner.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/VolumeScanner.java
index ff655c2..212e13b 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/VolumeScanner.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/VolumeScanner.java
@@ -536,11 +536,13 @@ public class VolumeScanner extends Thread {
           return 0;
         }
       }
-      long saveDelta = monotonicMs - curBlockIter.getLastSavedMs();
-      if (saveDelta >= conf.cursorSaveMs) {
-        LOG.debug("{}: saving block iterator {} after {} ms.",
-            this, curBlockIter, saveDelta);
-        saveBlockIterator(curBlockIter);
+      if (curBlockIter != null) {
+        long saveDelta = monotonicMs - curBlockIter.getLastSavedMs();
+        if (saveDelta >= conf.cursorSaveMs) {
+          LOG.debug("{}: saving block iterator {} after {} ms.",
+              this, curBlockIter, saveDelta);
+          saveBlockIterator(curBlockIter);
+        }
       }
       bytesScanned = scanBlock(block, conf.targetBytesPerSec);
       if (bytesScanned >= 0) {

Reply via email to