Forráskód Böngészése

HADOOP-5728. Fixed FSEditLog.printStatistics IndexOutOfBoundsException. (Wang Xu via johan)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@777594 13f79535-47bb-0310-9956-ffa450edef68
Johan Oskarsson 16 éve
szülő
commit
ad29a664cf

+ 3 - 0
CHANGES.txt

@@ -658,6 +658,9 @@ Trunk (unreleased changes)
 
 
     HADOOP-5867. Fix javac warnings found in NNBench and NNBenchWithoutMR.
     HADOOP-5867. Fix javac warnings found in NNBench and NNBenchWithoutMR.
     (Konstantin Boudnik via szetszwo)
     (Konstantin Boudnik via szetszwo)
+    
+    HADOOP-5728. Fixed FSEditLog.printStatistics IndexOutOfBoundsException.
+    (Wang Xu via johan)
 
 
 Release 0.20.1 - Unreleased
 Release 0.20.1 - Unreleased
 
 

+ 1 - 1
src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java

@@ -853,7 +853,7 @@ public class FSEditLog {
     if (lastPrintTime + 60000 > now && !force) {
     if (lastPrintTime + 60000 > now && !force) {
       return;
       return;
     }
     }
-    if (editStreams == null) {
+    if (editStreams == null || editStreams.size()==0) {
       return;
       return;
     }
     }
     lastPrintTime = now;
     lastPrintTime = now;