HBASE-951 Either shut down master or let it finish cleanup

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@712203 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jim Kellerman 2008-11-07 17:24:41 +00:00
parent 8fd65c9fbf
commit bf53013be5
2 changed files with 12 additions and 4 deletions

View File

@ -65,6 +65,7 @@ Release 0.19.0 - Unreleased
HBASE-982 Deleting a column in MapReduce fails (Doğacan Güney via Stack) HBASE-982 Deleting a column in MapReduce fails (Doğacan Güney via Stack)
HBASE-984 Fix javadoc warnings HBASE-984 Fix javadoc warnings
HBASE-985 Fix javadoc warnings HBASE-985 Fix javadoc warnings
HBASE-951 Either shut down master or let it finish cleanup
IMPROVEMENTS IMPROVEMENTS
HBASE-901 Add a limit to key length, check key and value length on client side HBASE-901 Add a limit to key length, check key and value length on client side

View File

@ -885,6 +885,7 @@ public class HMaster extends Thread implements HConstants, HMasterInterface,
System.exit(0); System.exit(0);
} }
@SuppressWarnings("null")
protected static void doMain(String [] args, protected static void doMain(String [] args,
Class<? extends HMaster> masterClass) { Class<? extends HMaster> masterClass) {
@ -923,11 +924,17 @@ public class HMaster extends Thread implements HConstants, HMasterInterface,
} }
if (cmd.equals("stop")) { if (cmd.equals("stop")) {
try {
if (LocalHBaseCluster.isLocal(conf)) { if (LocalHBaseCluster.isLocal(conf)) {
LocalHBaseCluster.doLocal(conf); conf = LocalHBaseCluster.doLocal(conf);
} }
HBaseAdmin adm = new HBaseAdmin(conf); HBaseAdmin adm = null;
try {
adm = new HBaseAdmin(conf);
} catch (MasterNotRunningException e) {
LOG.error("master is not running");
System.exit(0);
}
try {
adm.shutdown(); adm.shutdown();
} catch (Throwable t) { } catch (Throwable t) {
LOG.error( "Can not stop master", t); LOG.error( "Can not stop master", t);