HBASE-11395 Add logging for HBase table operations

This commit is contained in:
Ted Yu 2014-06-21 01:56:17 +00:00
parent c75afc5b8f
commit 008860cb3b
2 changed files with 4 additions and 1 deletions

View File

@ -196,6 +196,9 @@ public class CreateTableHandler extends EventHandler {
*/ */
protected void completed(final Throwable exception) { protected void completed(final Throwable exception) {
releaseTableLock(); releaseTableLock();
String msg = exception == null ? null : exception.getMessage();
LOG.info("Table, " + this.hTableDescriptor.getTableName() + ", creation " +
msg == null ? "successful" : "failed. " + msg);
if (exception != null) { if (exception != null) {
removeEnablingTable(this.assignmentManager, this.hTableDescriptor.getTableName()); removeEnablingTable(this.assignmentManager, this.hTableDescriptor.getTableName());
} }

View File

@ -191,7 +191,7 @@ public class DisableTableHandler extends EventHandler {
// Flip the table to disabled if success. // Flip the table to disabled if success.
if (done) this.assignmentManager.getTableStateManager().setTableState(this.tableName, if (done) this.assignmentManager.getTableStateManager().setTableState(this.tableName,
ZooKeeperProtos.Table.State.DISABLED); ZooKeeperProtos.Table.State.DISABLED);
LOG.info("Disabled table is done=" + done); LOG.info("Disabled table, " + this.tableName + ", is done=" + done);
} }
/** /**