Selaa lähdekoodia

HDFS-1728. SecondaryNameNode.checkpointSize is in bytes but not in MB.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hdfs/branches/HDFS-1052@1078943 13f79535-47bb-0310-9956-ffa450edef68
Tsz-wo Sze 14 vuotta sitten
vanhempi
commit
cf1c8ba6ea

+ 3 - 0
CHANGES.txt

@@ -709,6 +709,9 @@ Release 0.21.1 - Unreleased
     HDFS-1665. Balancer misuses dfs.heartbeat.interval as milliseconds.
     HDFS-1665. Balancer misuses dfs.heartbeat.interval as milliseconds.
     (szetszwo)
     (szetszwo)
 
 
+    HDFS-1728. SecondaryNameNode.checkpointSize is in bytes but not in MB.
+    (szetszwo)
+
 Release 0.21.0 - 2010-08-13
 Release 0.21.0 - 2010-08-13
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 3 - 2
src/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java

@@ -98,7 +98,7 @@ public class SecondaryNameNode implements Runnable {
   private Collection<URI> checkpointDirs;
   private Collection<URI> checkpointDirs;
   private Collection<URI> checkpointEditsDirs;
   private Collection<URI> checkpointEditsDirs;
   private long checkpointPeriod;    // in seconds
   private long checkpointPeriod;    // in seconds
-  private long checkpointSize;    // size (in MB) of current Edit Log
+  private long checkpointSize;    // size (in bytes) of current Edit Log
 
 
   /** {@inheritDoc} */
   /** {@inheritDoc} */
   public String toString() {
   public String toString() {
@@ -107,7 +107,8 @@ public class SecondaryNameNode implements Runnable {
       + "\nStart Time           : " + new Date(starttime)
       + "\nStart Time           : " + new Date(starttime)
       + "\nLast Checkpoint Time : " + (lastCheckpointTime == 0? "--": new Date(lastCheckpointTime))
       + "\nLast Checkpoint Time : " + (lastCheckpointTime == 0? "--": new Date(lastCheckpointTime))
       + "\nCheckpoint Period    : " + checkpointPeriod + " seconds"
       + "\nCheckpoint Period    : " + checkpointPeriod + " seconds"
-      + "\nCheckpoint Size      : " + checkpointSize + " MB"
+      + "\nCheckpoint Size      : " + StringUtils.byteDesc(checkpointSize)
+                                    + " (= " + checkpointSize + " bytes)" 
       + "\nCheckpoint Dirs      : " + checkpointDirs
       + "\nCheckpoint Dirs      : " + checkpointDirs
       + "\nCheckpoint Edits Dirs: " + checkpointEditsDirs;
       + "\nCheckpoint Edits Dirs: " + checkpointEditsDirs;
   }
   }