HBASE-17817 add table name to output (if available) when removing coprocessors

Amending-Author: Sean Busbey <busbey@apache.org>
Signed-off-by: Sean Busbey <busbey@apache.org>
This commit is contained in:
Steen Manniche 2017-04-11 17:48:50 +02:00 committed by Sean Busbey
parent 5411d3ecb1
commit 635c9db815
1 changed files with 9 additions and 2 deletions

View File

@ -600,9 +600,16 @@ public abstract class CoprocessorHost<E extends CoprocessorEnvironment> {
if (env.getConfiguration().getBoolean(ABORT_ON_ERROR_KEY, DEFAULT_ABORT_ON_ERROR)) {
// server is configured to abort.
abortServer(env, e);
} else {
// If available, pull a table name out of the environment
if(env instanceof RegionCoprocessorEnvironment) {
String tableName = ((RegionCoprocessorEnvironment)env).getRegionInfo().getTable().getNameAsString();
LOG.error("Removing coprocessor '" + env.toString() + "' from table '"+ tableName + "'", e);
} else {
LOG.error("Removing coprocessor '" + env.toString() + "' from " +
"environment because it threw: " + e,e);
"environment",e);
}
coprocessors.remove(env);
try {
shutdown(env);