From 008860cb3bd9ddd87d3efe848646dec58ab25708 Mon Sep 17 00:00:00 2001 From: Ted Yu Date: Sat, 21 Jun 2014 01:56:17 +0000 Subject: [PATCH] HBASE-11395 Add logging for HBase table operations --- .../apache/hadoop/hbase/master/handler/CreateTableHandler.java | 3 +++ .../hadoop/hbase/master/handler/DisableTableHandler.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/CreateTableHandler.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/CreateTableHandler.java index e72324745b6..6ddd0e7fdca 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/CreateTableHandler.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/CreateTableHandler.java @@ -196,6 +196,9 @@ public class CreateTableHandler extends EventHandler { */ protected void completed(final Throwable exception) { releaseTableLock(); + String msg = exception == null ? null : exception.getMessage(); + LOG.info("Table, " + this.hTableDescriptor.getTableName() + ", creation " + + msg == null ? "successful" : "failed. " + msg); if (exception != null) { removeEnablingTable(this.assignmentManager, this.hTableDescriptor.getTableName()); } diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DisableTableHandler.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DisableTableHandler.java index a83eb3f2a03..f9f6147da5e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DisableTableHandler.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DisableTableHandler.java @@ -191,7 +191,7 @@ public class DisableTableHandler extends EventHandler { // Flip the table to disabled if success. if (done) this.assignmentManager.getTableStateManager().setTableState(this.tableName, ZooKeeperProtos.Table.State.DISABLED); - LOG.info("Disabled table is done=" + done); + LOG.info("Disabled table, " + this.tableName + ", is done=" + done); } /**