Bläddra i källkod

HDFS-9555. LazyPersistFileScrubber should still sleep if there are errors in the clear progress. Contributed by Phil Yang.

(cherry picked from commit 5d4255a80156d2cacfea8184b41805070223d3a9)

Conflicts:
	hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
Kihwal Lee 9 år sedan
förälder
incheckning
9e3b91b141

+ 3 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -158,6 +158,9 @@ Release 2.7.3 - UNRELEASED
     HDFS-10239. Fsshell mv fails if port usage doesn't match in src and
     destination paths (Kuhu Shukla via kihwal)
 
+    HDFS-9555. LazyPersistFileScrubber should still sleep if there are errors
+    in the clear progress (Phil Yang via kihwal)
+
 Release 2.7.2 - 2016-01-25
 
   INCOMPATIBLE CHANGES

+ 6 - 3
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java

@@ -4774,14 +4774,17 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
       while (fsRunning && shouldRun) {
         try {
           clearCorruptLazyPersistFiles();
+        } catch (Exception e) {
+          FSNamesystem.LOG.error(
+              "Ignoring exception in LazyPersistFileScrubber:", e);
+        }
+
+        try {
           Thread.sleep(scrubIntervalSec * 1000);
         } catch (InterruptedException e) {
           FSNamesystem.LOG.info(
               "LazyPersistFileScrubber was interrupted, exiting");
           break;
-        } catch (Exception e) {
-          FSNamesystem.LOG.error(
-              "Ignoring exception in LazyPersistFileScrubber:", e);
         }
       }
     }