hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-17308 BackupInfo getShortDescription output format (Vladimir Rodionov)
Date Wed, 14 Dec 2016 21:58:30 GMT
Repository: hbase
Updated Branches:
  refs/heads/HBASE-7912 7d96a214e -> f4a3a91be


HBASE-17308 BackupInfo getShortDescription output format (Vladimir Rodionov)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/f4a3a91b
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/f4a3a91b
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/f4a3a91b

Branch: refs/heads/HBASE-7912
Commit: f4a3a91be782efd3496052f49809720d9ab136c4
Parents: 7d96a21
Author: tedyu <yuzhihong@gmail.com>
Authored: Wed Dec 14 13:57:52 2016 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Wed Dec 14 13:57:52 2016 -0800

----------------------------------------------------------------------
 .../apache/hadoop/hbase/backup/BackupInfo.java  | 21 +++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/f4a3a91b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupInfo.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupInfo.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupInfo.java
index 834245f..d06ae18 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupInfo.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/BackupInfo.java
@@ -514,26 +514,29 @@ public class BackupInfo implements Comparable<BackupInfo> {
 
   public String getShortDescription() {
     StringBuilder sb = new StringBuilder();
-    sb.append("ID             : " + backupId).append("\n");
-    sb.append("Type           : " + getType()).append("\n");
-    sb.append("Tables         : " + getTableListAsString()).append("\n");
-    sb.append("State          : " + getState()).append("\n");
+    sb.append("{");
+    sb.append("ID=" + backupId).append(",");
+    sb.append("Type=" + getType()).append(",");
+    sb.append("Tables=" + getTableListAsString()).append(",");
+    sb.append("State=" + getState()).append(",");
     Date date = null;
     Calendar cal = Calendar.getInstance();
     cal.setTimeInMillis(getStartTs());
     date = cal.getTime();
-    sb.append("Start time     : " + date).append("\n");
+    sb.append("Start time=" + date).append(",");
     if (state == BackupState.FAILED) {
-      sb.append("Failed message : " + getFailedMsg()).append("\n");
+      sb.append("Failed message=" + getFailedMsg()).append(",");
     } else if (state == BackupState.RUNNING) {
-      sb.append("Phase          : " + getPhase()).append("\n");
+      sb.append("Phase=" + getPhase()).append(",");
     } else if (state == BackupState.COMPLETE) {
       cal = Calendar.getInstance();
       cal.setTimeInMillis(getEndTs());
       date = cal.getTime();
-      sb.append("End time       : " + date).append("\n");
+      sb.append("End time=" + date).append(",");
     }
-    sb.append("Progress       : " + getProgress()+"%").append("\n");
+    sb.append("Progress=" + getProgress()+"%");
+    sb.append("}");
+
     return sb.toString();
   }
 


Mime
View raw message