HBASE-10614 Master could not be stopped (Jingcheng Du)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1571915 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d77ef9a8b5
commit
29a526ab73
|
@ -163,11 +163,11 @@ public class MetaReader {
|
|||
private static HTable getHTable(final CatalogTracker catalogTracker,
|
||||
final TableName tableName)
|
||||
throws IOException {
|
||||
// Passing the CatalogTracker's connection configuration ensures this
|
||||
// Passing the CatalogTracker's connection ensures this
|
||||
// HTable instance uses the CatalogTracker's connection.
|
||||
org.apache.hadoop.hbase.client.HConnection c = catalogTracker.getConnection();
|
||||
if (c == null) throw new NullPointerException("No connection");
|
||||
return new HTable(catalogTracker.getConnection().getConfiguration(), tableName);
|
||||
return new HTable(tableName, c);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -168,8 +168,11 @@ public class ServerShutdownHandler extends EventHandler {
|
|||
while (!this.server.isStopped()) {
|
||||
try {
|
||||
this.server.getCatalogTracker().waitForMeta();
|
||||
hris = MetaReader.getServerUserRegions(this.server.getCatalogTracker(),
|
||||
this.serverName);
|
||||
// Skip getting user regions if the server is stopped.
|
||||
if (!this.server.isStopped()) {
|
||||
hris = MetaReader.getServerUserRegions(this.server.getCatalogTracker(),
|
||||
this.serverName);
|
||||
}
|
||||
break;
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
|
|
Loading…
Reference in New Issue