diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 9d12ec054e9..3a7fb694ab5 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -154,6 +154,9 @@ Release 2.5.0 - UNRELEASED HDFS-5865. Update OfflineImageViewer document. (Akira Ajisaka via wheat9) + HDFS-6270. Secondary namenode status page shows transaction count in bytes. + (Benoy Antony via wheat9) + Release 2.4.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java index c0d7af96286..752c18b6174 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java @@ -78,7 +78,6 @@ import org.apache.hadoop.util.Time; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableList; import org.apache.hadoop.util.VersionInfo; import javax.management.ObjectName; @@ -130,16 +129,15 @@ public class SecondaryNameNode implements Runnable, @Override public String toString() { return getClass().getSimpleName() + " Status" - + "\nName Node Address : " + nameNodeAddr - + "\nStart Time : " + new Date(starttime) - + "\nLast Checkpoint : " + (lastCheckpointTime == 0? "--": + + "\nName Node Address : " + nameNodeAddr + + "\nStart Time : " + new Date(starttime) + + "\nLast Checkpoint : " + (lastCheckpointTime == 0? "--": ((Time.monotonicNow() - lastCheckpointTime) / 1000)) + " seconds ago" - + "\nCheckpoint Period : " + checkpointConf.getPeriod() + " seconds" - + "\nCheckpoint Size : " + StringUtils.byteDesc(checkpointConf.getTxnCount()) - + " (= " + checkpointConf.getTxnCount() + " bytes)" - + "\nCheckpoint Dirs : " + checkpointDirs - + "\nCheckpoint Edits Dirs: " + checkpointEditsDirs; + + "\nCheckpoint Period : " + checkpointConf.getPeriod() + " seconds" + + "\nCheckpoint Transactions: " + checkpointConf.getTxnCount() + + "\nCheckpoint Dirs : " + checkpointDirs + + "\nCheckpoint Edits Dirs : " + checkpointEditsDirs; } @VisibleForTesting diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/secondary/status.html b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/secondary/status.html index 86257e96e5c..1b1599bf60b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/secondary/status.html +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/secondary/status.html @@ -66,7 +66,7 @@