瀏覽代碼

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

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/branches/branch-0.20@777596 13f79535-47bb-0310-9956-ffa450edef68
Johan Oskarsson 16 年之前
父節點
當前提交
20d7e19dd3
共有 2 個文件被更改,包括 4 次插入1 次删除
  1. 3 0
      CHANGES.txt
  2. 1 1
      src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java

+ 3 - 0
CHANGES.txt

@@ -79,6 +79,9 @@ Release 0.20.1 - Unreleased
 
     HADOOP-5850. Fixes a problem to do with not being able to jobs with  
     0 maps/reduces. (Vinod K V via ddas)
+    
+    HADOOP-5728. Fixed FSEditLog.printStatistics IndexOutOfBoundsException.
+    (Wang Xu via johan)    
 
 Release 0.20.0 - 2009-04-15
 

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

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