From bf8f53407710b812a56b31386c89a6c70a3b861a Mon Sep 17 00:00:00 2001 From: "terence.yoo" Date: Fri, 30 Aug 2019 16:57:35 +0900 Subject: [PATCH] modify log messages --- .../java/com/kakao/hbase/manager/command/Merge.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hbase0.98/hbase-manager-0.98/src/main/java/com/kakao/hbase/manager/command/Merge.java b/hbase0.98/hbase-manager-0.98/src/main/java/com/kakao/hbase/manager/command/Merge.java index 382b55b..05f2284 100644 --- a/hbase0.98/hbase-manager-0.98/src/main/java/com/kakao/hbase/manager/command/Merge.java +++ b/hbase0.98/hbase-manager-0.98/src/main/java/com/kakao/hbase/manager/command/Merge.java @@ -92,26 +92,29 @@ public void setTest(boolean test) { @Override public void run() throws Exception { long timestampPrev; + int i = 1; // todo refactoring if (actionParam.toLowerCase().equals("empty-fast")) { for (String tableName : tableNameSet) { timestampPrev = System.currentTimeMillis(); TableInfo tableInfo = new TableInfo(admin, tableName, args); + Util.printMessage(i + "/" + tableNameSet.size() + " - Table - " + tableName + " - empty-fast - Start"); timestampPrev = Util.printVerboseMessage(args, "Merge.run.new TableInfo", timestampPrev); emptyFast(tableInfo); Util.printVerboseMessage(args, "Merge.run.emptyFast", timestampPrev); + Util.printMessage(i++ + "/" + tableNameSet.size() + " - Table - " + tableName + " - empty-fast - End\n"); } } else if (actionParam.toLowerCase().equals("empty")) { for (String tableName : tableNameSet) { TableInfo tableInfo = new TableInfo(admin, tableName, args); - Util.printMessage("Table - " + tableName + " - empty-fast - Start"); + Util.printMessage(i + "/" + tableNameSet.size() + " - Table - " + tableName + " - empty-fast - Start"); emptyFast(tableInfo); - Util.printMessage("Table - " + tableName + " - empty-fast - End\n"); + Util.printMessage(i + "/" + tableNameSet.size() + " - Table - " + tableName + " - empty-fast - End\n"); - Util.printMessage("Table - " + tableName + " - empty - Start"); + Util.printMessage(i + "/" + tableNameSet.size() + " - Table - " + tableName + " - empty - Start"); empty(tableInfo); - Util.printMessage("Table - " + tableName + " - empty - End"); + Util.printMessage(i++ + "/" + tableNameSet.size() + " - Table - " + tableName + " - empty - End"); } } else if (actionParam.toLowerCase().equals("size")) { throw new IllegalStateException("Not implemented yet"); //todo @@ -311,7 +314,7 @@ private void emptyFast(TableInfo tableInfo) throws Exception { private void printMergeInfo(HRegionInfo regionA, HRegionInfo regionB) { Util.printMessage("Merge regions"); System.out.println(" - " + Util.getRegionInfoString(regionA)); - System.out.println(" L " + Util.getRegionInfoString(regionB)); + System.out.println(" └ " + Util.getRegionInfoString(regionB)); } private List findEmptyRegions(TableInfo tableInfo) throws Exception {