HBASE-3355 Stopping a stopped cluster leaks an HMaster
HBASE-3356 Add more checks in replication if RS is stopped git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1049249 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
36be388220
commit
e5ebff208a
|
@ -775,6 +775,8 @@ Release 0.90.0 - Unreleased
|
||||||
HBASE-3351 ReplicationZookeeper goes to ZK every time a znode is modified
|
HBASE-3351 ReplicationZookeeper goes to ZK every time a znode is modified
|
||||||
HBASE-3326 Replication state's znode should be created else it
|
HBASE-3326 Replication state's znode should be created else it
|
||||||
defaults to false
|
defaults to false
|
||||||
|
HBASE-3355 Stopping a stopped cluster leaks an HMaster
|
||||||
|
HBASE-3356 Add more checks in replication if RS is stopped
|
||||||
|
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
|
|
|
@ -157,6 +157,9 @@ public class HMasterCommandLine extends ServerCommandLine {
|
||||||
private int stopMaster() {
|
private int stopMaster() {
|
||||||
HBaseAdmin adm = null;
|
HBaseAdmin adm = null;
|
||||||
try {
|
try {
|
||||||
|
Configuration conf = getConf();
|
||||||
|
// Don't try more than once
|
||||||
|
conf.setInt("hbase.client.retries.number", 1);
|
||||||
adm = new HBaseAdmin(getConf());
|
adm = new HBaseAdmin(getConf());
|
||||||
} catch (MasterNotRunningException e) {
|
} catch (MasterNotRunningException e) {
|
||||||
LOG.error("Master not running");
|
LOG.error("Master not running");
|
||||||
|
|
|
@ -612,6 +612,10 @@ public class ReplicationZookeeper {
|
||||||
ZKUtil.deleteNodeRecursively(this.zookeeper,
|
ZKUtil.deleteNodeRecursively(this.zookeeper,
|
||||||
this.rsServerNameZnode);
|
this.rsServerNameZnode);
|
||||||
} catch (KeeperException e) {
|
} catch (KeeperException e) {
|
||||||
|
// if the znode is already expired, don't bother going further
|
||||||
|
if (e instanceof KeeperException.SessionExpiredException) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.abortable.abort("Failed delete of " + this.rsServerNameZnode, e);
|
this.abortable.abort("Failed delete of " + this.rsServerNameZnode, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,7 +150,7 @@ public class ReplicationSourceManager {
|
||||||
for (String id : this.zkHelper.getPeerClusters().keySet()) {
|
for (String id : this.zkHelper.getPeerClusters().keySet()) {
|
||||||
addSource(id);
|
addSource(id);
|
||||||
}
|
}
|
||||||
List<String> currentReplicators = this.zkHelper.getRegisteredRegionServers();
|
List<String> currentReplicators = this.zkHelper.getListOfReplicators();
|
||||||
if (currentReplicators == null || currentReplicators.size() == 0) {
|
if (currentReplicators == null || currentReplicators.size() == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -406,6 +406,9 @@ public class ReplicationSourceManager {
|
||||||
* @param path full path of the deleted node
|
* @param path full path of the deleted node
|
||||||
*/
|
*/
|
||||||
public void nodeDeleted(String path) {
|
public void nodeDeleted(String path) {
|
||||||
|
if (stopper.isStopped()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
boolean cont = refreshRegionServersList(path);
|
boolean cont = refreshRegionServersList(path);
|
||||||
if (!cont) {
|
if (!cont) {
|
||||||
return;
|
return;
|
||||||
|
@ -419,6 +422,9 @@ public class ReplicationSourceManager {
|
||||||
* @param path full path of the node whose children have changed
|
* @param path full path of the node whose children have changed
|
||||||
*/
|
*/
|
||||||
public void nodeChildrenChanged(String path) {
|
public void nodeChildrenChanged(String path) {
|
||||||
|
if (stopper.isStopped()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
refreshRegionServersList(path);
|
refreshRegionServersList(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue