HBASE-1732 Flag to disable regionserver restart
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@799991 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7e7bf2a9a0
commit
24de2aec2f
|
@ -308,6 +308,7 @@ Release 0.20.0 - Unreleased
|
|||
on reinit
|
||||
HBASE-1725 Old TableMap interface's definitions are not generic enough
|
||||
(Doğacan Güney via Stack)
|
||||
HBASE-1732 Flag to disable regionserver restart
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-1089 Add count of regions on filesystem to master UI; add percentage
|
||||
|
|
|
@ -355,7 +355,7 @@ public class HRegionServer implements HConstants, HRegionInterface,
|
|||
EventType type = event.getType();
|
||||
KeeperState state = event.getState();
|
||||
LOG.info("Got ZooKeeper event, state: " + state + ", type: " +
|
||||
type + ", path: " + event.getPath());
|
||||
type + ", path: " + event.getPath());
|
||||
|
||||
// Ignore events if we're shutting down.
|
||||
if (stopRequested.get()) {
|
||||
|
@ -365,7 +365,13 @@ public class HRegionServer implements HConstants, HRegionInterface,
|
|||
|
||||
if (state == KeeperState.Expired) {
|
||||
LOG.error("ZooKeeper session expired");
|
||||
restart();
|
||||
boolean restart =
|
||||
this.conf.getBoolean("hbase.regionserver.restart.on.zk.expire", false);
|
||||
if (restart) {
|
||||
restart();
|
||||
} else {
|
||||
abort();
|
||||
}
|
||||
} else if (type == EventType.NodeDeleted) {
|
||||
watchMasterAddress();
|
||||
} else if (type == EventType.NodeCreated) {
|
||||
|
|
Loading…
Reference in New Issue