浏览代码

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 年之前
父节点
当前提交
cf1c8ba6ea
共有 2 个文件被更改,包括 6 次插入2 次删除
  1. 3 0
      CHANGES.txt
  2. 3 2
      src/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java

+ 3 - 0
CHANGES.txt

@@ -709,6 +709,9 @@ Release 0.21.1 - Unreleased
     HDFS-1665. Balancer misuses dfs.heartbeat.interval as milliseconds.
     (szetszwo)
 
+    HDFS-1728. SecondaryNameNode.checkpointSize is in bytes but not in MB.
+    (szetszwo)
+
 Release 0.21.0 - 2010-08-13
 
   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> checkpointEditsDirs;
   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} */
   public String toString() {
@@ -107,7 +107,8 @@ public class SecondaryNameNode implements Runnable {
       + "\nStart Time           : " + new Date(starttime)
       + "\nLast Checkpoint Time : " + (lastCheckpointTime == 0? "--": new Date(lastCheckpointTime))
       + "\nCheckpoint Period    : " + checkpointPeriod + " seconds"
-      + "\nCheckpoint Size      : " + checkpointSize + " MB"
+      + "\nCheckpoint Size      : " + StringUtils.byteDesc(checkpointSize)
+                                    + " (= " + checkpointSize + " bytes)" 
       + "\nCheckpoint Dirs      : " + checkpointDirs
       + "\nCheckpoint Edits Dirs: " + checkpointEditsDirs;
   }