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/branches/branch-0.19@777597 13f79535-47bb-0310-9956-ffa450edef68
Johan Oskarsson 16 éve
szülő
commit
76d3b06b37

+ 3 - 0
CHANGES.txt

@@ -110,6 +110,9 @@ Release 0.19.2 - Unreleased
 
     HADOOP-5579. Set errno correctly in libhdfs for permission, quota, and FNF
     conditions. (Brian Bockelman via cdouglas)
+    
+    HADOOP-5728. Fixed FSEditLog.printStatistics IndexOutOfBoundsException.
+    (Wang Xu via johan)
 
 Release 0.19.1 - 2009-02-23 
 

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

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