HBASE-6120 Few logging improvements around enabling tables
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1344476 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4ebecd3eba
commit
a43d806e46
|
@ -125,7 +125,7 @@ public class CreateTableHandler extends EventHandler {
|
||||||
public void process() {
|
public void process() {
|
||||||
String tableName = this.hTableDescriptor.getNameAsString();
|
String tableName = this.hTableDescriptor.getNameAsString();
|
||||||
try {
|
try {
|
||||||
LOG.info("Attemping to create the table " + tableName);
|
LOG.info("Attempting to create the table " + tableName);
|
||||||
MasterCoprocessorHost cpHost = ((HMaster) this.server).getCoprocessorHost();
|
MasterCoprocessorHost cpHost = ((HMaster) this.server).getCoprocessorHost();
|
||||||
if (cpHost != null) {
|
if (cpHost != null) {
|
||||||
cpHost.preCreateTableHandler(this.hTableDescriptor, this.newRegions);
|
cpHost.preCreateTableHandler(this.hTableDescriptor, this.newRegions);
|
||||||
|
|
|
@ -98,7 +98,7 @@ public class DisableTableHandler extends EventHandler {
|
||||||
@Override
|
@Override
|
||||||
public void process() {
|
public void process() {
|
||||||
try {
|
try {
|
||||||
LOG.info("Attemping to disable table " + this.tableNameStr);
|
LOG.info("Attempting to disable table " + this.tableNameStr);
|
||||||
MasterCoprocessorHost cpHost = ((HMaster) this.server)
|
MasterCoprocessorHost cpHost = ((HMaster) this.server)
|
||||||
.getCoprocessorHost();
|
.getCoprocessorHost();
|
||||||
if (cpHost != null) {
|
if (cpHost != null) {
|
||||||
|
|
|
@ -97,7 +97,7 @@ public class EnableTableHandler extends EventHandler {
|
||||||
@Override
|
@Override
|
||||||
public void process() {
|
public void process() {
|
||||||
try {
|
try {
|
||||||
LOG.info("Attemping to enable the table " + this.tableNameStr);
|
LOG.info("Attempting to enable the table " + this.tableNameStr);
|
||||||
MasterCoprocessorHost cpHost = ((HMaster) this.server)
|
MasterCoprocessorHost cpHost = ((HMaster) this.server)
|
||||||
.getCoprocessorHost();
|
.getCoprocessorHost();
|
||||||
if (cpHost != null) {
|
if (cpHost != null) {
|
||||||
|
@ -131,8 +131,8 @@ public class EnableTableHandler extends EventHandler {
|
||||||
if (regionsCount == 0) {
|
if (regionsCount == 0) {
|
||||||
done = true;
|
done = true;
|
||||||
}
|
}
|
||||||
LOG.info("Table has " + countOfRegionsInTable + " regions of which " +
|
LOG.info("Table '" + this.tableNameStr + "' has " + countOfRegionsInTable
|
||||||
regionsCount + " are offline.");
|
+ " regions, of which " + regionsCount + " are offline.");
|
||||||
BulkEnabler bd = new BulkEnabler(this.server, regions,
|
BulkEnabler bd = new BulkEnabler(this.server, regions,
|
||||||
countOfRegionsInTable);
|
countOfRegionsInTable);
|
||||||
try {
|
try {
|
||||||
|
@ -140,14 +140,21 @@ public class EnableTableHandler extends EventHandler {
|
||||||
done = true;
|
done = true;
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
LOG.warn("Enable was interrupted");
|
LOG.warn("Enable operation was interrupted when enabling table '"
|
||||||
|
+ this.tableNameStr + "'");
|
||||||
// Preserve the interrupt.
|
// Preserve the interrupt.
|
||||||
Thread.currentThread().interrupt();
|
Thread.currentThread().interrupt();
|
||||||
}
|
}
|
||||||
// Flip the table to enabled.
|
if (done) {
|
||||||
if (done) this.assignmentManager.getZKTable().setEnabledTable(
|
// Flip the table to enabled.
|
||||||
this.tableNameStr);
|
this.assignmentManager.getZKTable().setEnabledTable(
|
||||||
LOG.info("Enabled table is done=" + done);
|
this.tableNameStr);
|
||||||
|
LOG.info("Table '" + this.tableNameStr
|
||||||
|
+ "' was successfully enabled. Status: done=" + done);
|
||||||
|
} else {
|
||||||
|
LOG.warn("Table '" + this.tableNameStr
|
||||||
|
+ "' wasn't successfully enabled. Status: done=" + done);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue