hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jia...@apache.org
Subject [32/47] hadoop git commit: 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)
Date Wed, 05 Aug 2015 22:23:45 GMT
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)


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

Branch: refs/heads/YARN-1197
Commit: 9a08999906824e8982ec3b47315f9b960474186a
Parents: c3364ca
Author: yliu <yliu@apache.org>
Authored: Tue Aug 4 15:54:23 2015 +0800
Committer: yliu <yliu@apache.org>
Committed: Tue Aug 4 15:54:23 2015 +0800

----------------------------------------------------------------------
 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/9a089999/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 a2d7c2f..eeefd84 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -1109,6 +1109,10 @@ Release 2.8.0 - UNRELEASED
     HDFS-8847. change TestHDFSContractAppend to not override
     testRenameFileBeingAppended method. (Zhihai Xu)
 
+    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.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9a089999/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) {


Mime
View raw message