[04/50] [abbrv] hbase git commit: HBASE-18058 Zookeeper retry sleep time should have an upper limit (Allan Yang)
HBASE-18058 Zookeeper retry sleep time should have an upper limit (Allan Yang) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ed4f7d1b Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ed4f7d1b Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ed4f7d1b Branch: refs/heads/branch-1.3 Commit: ed4f7d1b1b4497caf859da6119c2940fdfaba9a9 Parents: 4e4756e Author: tedyu Authored: Fri May 19 10:58:38 2017 -0700 Committer: Andrew Purtell Committed: Wed Dec 12 18:08:16 2018 -0800 -- .../apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java | 8 .../main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java | 3 ++- hbase-common/src/main/resources/hbase-default.xml| 7 +++ 3 files changed, 13 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/ed4f7d1b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java index e74aeb4..f799148 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java @@ -98,20 +98,20 @@ public class RecoverableZooKeeper { private static final int ID_LENGTH_SIZE = Bytes.SIZEOF_INT; public RecoverableZooKeeper(String quorumServers, int sessionTimeout, - Watcher watcher, int maxRetries, int retryIntervalMillis) + Watcher watcher, int maxRetries, int retryIntervalMillis, int maxSleepTime) throws IOException { -this(quorumServers, sessionTimeout, watcher, maxRetries, retryIntervalMillis, +this(quorumServers, sessionTimeout, watcher, maxRetries, retryIntervalMillis, maxSleepTime, null); } @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="DE_MIGHT_IGNORE", justification="None. Its always been this way.") public RecoverableZooKeeper(String quorumServers, int sessionTimeout, - Watcher watcher, int maxRetries, int retryIntervalMillis, String identifier) + Watcher watcher, int maxRetries, int retryIntervalMillis, int maxSleepTime, String identifier) throws IOException { // TODO: Add support for zk 'chroot'; we don't add it to the quorumServers String as we should. this.retryCounterFactory = - new RetryCounterFactory(maxRetries+1, retryIntervalMillis); + new RetryCounterFactory(maxRetries+1, retryIntervalMillis, maxSleepTime); if (identifier == null || identifier.length() == 0) { // the identifier = processID@hostName http://git-wip-us.apache.org/repos/asf/hbase/blob/ed4f7d1b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java index 3cbc317..4f4b2eb 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java @@ -133,10 +133,11 @@ public class ZKUtil { int retry = conf.getInt("zookeeper.recovery.retry", 3); int retryIntervalMillis = conf.getInt("zookeeper.recovery.retry.intervalmill", 1000); +int maxSleepTime = conf.getInt("zookeeper.recovery.retry.maxsleeptime", 6); zkDumpConnectionTimeOut = conf.getInt("zookeeper.dump.connection.timeout", 1000); return new RecoverableZooKeeper(ensemble, timeout, watcher, -retry, retryIntervalMillis, identifier); +retry, retryIntervalMillis, maxSleepTime, identifier); } /** http://git-wip-us.apache.org/repos/asf/hbase/blob/ed4f7d1b/hbase-common/src/main/resources/hbase-default.xml -- diff --git a/hbase-common/src/main/resources/hbase-default.xml b/hbase-common/src/main/resources/hbase-default.xml index e28f355..88e57d7 100644 --- a/hbase-common/src/main/resources/hbase-default.xml +++ b/hbase-common/src/main/resources/hbase-default.xml @@ -103,6 +103,13 @@ possible configurations would overwhelm and obscure the important. and running --> +zookeeper.recovery.retry.maxsleeptime +6 +Max sleep time before retry zookeeper operations in milliseconds, +a max time is needed here so that sleep time won't grow unboundedly + + + hbase.local.dir ${hbase.tmp.dir}/local/ Directory on the local filesystem to be used
hbase git commit: HBASE-18058 Zookeeper retry sleep time should have an upper limit (Allan Yang)
Repository: hbase Updated Branches: refs/heads/branch-1 f348caf7f -> 300c5388f HBASE-18058 Zookeeper retry sleep time should have an upper limit (Allan Yang) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/300c5388 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/300c5388 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/300c5388 Branch: refs/heads/branch-1 Commit: 300c5388f2358418faff53558967e00e616c8e1a Parents: f348caf Author: tedyuAuthored: Fri May 19 10:58:38 2017 -0700 Committer: tedyu Committed: Fri May 19 10:58:38 2017 -0700 -- .../apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java | 8 .../main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java | 3 ++- hbase-common/src/main/resources/hbase-default.xml| 7 +++ 3 files changed, 13 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/300c5388/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java index 9dad2d1..75cee0a 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java @@ -100,20 +100,20 @@ public class RecoverableZooKeeper { private static final int ID_LENGTH_SIZE = Bytes.SIZEOF_INT; public RecoverableZooKeeper(String quorumServers, int sessionTimeout, - Watcher watcher, int maxRetries, int retryIntervalMillis) + Watcher watcher, int maxRetries, int retryIntervalMillis, int maxSleepTime) throws IOException { -this(quorumServers, sessionTimeout, watcher, maxRetries, retryIntervalMillis, +this(quorumServers, sessionTimeout, watcher, maxRetries, retryIntervalMillis, maxSleepTime, null); } @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="DE_MIGHT_IGNORE", justification="None. Its always been this way.") public RecoverableZooKeeper(String quorumServers, int sessionTimeout, - Watcher watcher, int maxRetries, int retryIntervalMillis, String identifier) + Watcher watcher, int maxRetries, int retryIntervalMillis, int maxSleepTime, String identifier) throws IOException { // TODO: Add support for zk 'chroot'; we don't add it to the quorumServers String as we should. this.retryCounterFactory = - new RetryCounterFactory(maxRetries+1, retryIntervalMillis); + new RetryCounterFactory(maxRetries+1, retryIntervalMillis, maxSleepTime); if (identifier == null || identifier.length() == 0) { // the identifier = processID@hostName http://git-wip-us.apache.org/repos/asf/hbase/blob/300c5388/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java index 3cbc317..4f4b2eb 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java @@ -133,10 +133,11 @@ public class ZKUtil { int retry = conf.getInt("zookeeper.recovery.retry", 3); int retryIntervalMillis = conf.getInt("zookeeper.recovery.retry.intervalmill", 1000); +int maxSleepTime = conf.getInt("zookeeper.recovery.retry.maxsleeptime", 6); zkDumpConnectionTimeOut = conf.getInt("zookeeper.dump.connection.timeout", 1000); return new RecoverableZooKeeper(ensemble, timeout, watcher, -retry, retryIntervalMillis, identifier); +retry, retryIntervalMillis, maxSleepTime, identifier); } /** http://git-wip-us.apache.org/repos/asf/hbase/blob/300c5388/hbase-common/src/main/resources/hbase-default.xml -- diff --git a/hbase-common/src/main/resources/hbase-default.xml b/hbase-common/src/main/resources/hbase-default.xml index c571289..e9fe34f 100644 --- a/hbase-common/src/main/resources/hbase-default.xml +++ b/hbase-common/src/main/resources/hbase-default.xml @@ -103,6 +103,13 @@ possible configurations would overwhelm and obscure the important. and running --> +zookeeper.recovery.retry.maxsleeptime +6 +Max sleep time before retry zookeeper operations in milliseconds, +a max time is needed here so that sleep time won't grow unboundedly + + +
hbase git commit: HBASE-18058 Zookeeper retry sleep time should have an upper limit (Allan Yang)
Repository: hbase Updated Branches: refs/heads/master 6dc4190c0 -> d137991cc HBASE-18058 Zookeeper retry sleep time should have an upper limit (Allan Yang) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/d137991c Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d137991c Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d137991c Branch: refs/heads/master Commit: d137991ccc876988ae8832c316457e525f6bf387 Parents: 6dc4190c Author: tedyuAuthored: Thu May 18 15:50:59 2017 -0700 Committer: tedyu Committed: Thu May 18 15:50:59 2017 -0700 -- .../apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java | 8 .../main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java | 3 ++- hbase-common/src/main/resources/hbase-default.xml| 7 +++ 3 files changed, 13 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/d137991c/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java index e0a950d..6968ad9 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java @@ -100,20 +100,20 @@ public class RecoverableZooKeeper { private static final int ID_LENGTH_SIZE = Bytes.SIZEOF_INT; public RecoverableZooKeeper(String quorumServers, int sessionTimeout, - Watcher watcher, int maxRetries, int retryIntervalMillis) + Watcher watcher, int maxRetries, int retryIntervalMillis, int maxSleepTime) throws IOException { -this(quorumServers, sessionTimeout, watcher, maxRetries, retryIntervalMillis, +this(quorumServers, sessionTimeout, watcher, maxRetries, retryIntervalMillis, maxSleepTime, null); } @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="DE_MIGHT_IGNORE", justification="None. Its always been this way.") public RecoverableZooKeeper(String quorumServers, int sessionTimeout, - Watcher watcher, int maxRetries, int retryIntervalMillis, String identifier) + Watcher watcher, int maxRetries, int retryIntervalMillis, int maxSleepTime, String identifier) throws IOException { // TODO: Add support for zk 'chroot'; we don't add it to the quorumServers String as we should. this.retryCounterFactory = - new RetryCounterFactory(maxRetries+1, retryIntervalMillis); + new RetryCounterFactory(maxRetries+1, retryIntervalMillis, maxSleepTime); if (identifier == null || identifier.length() == 0) { // the identifier = processID@hostName http://git-wip-us.apache.org/repos/asf/hbase/blob/d137991c/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java -- diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java index c678a7c..08b059e 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java @@ -131,10 +131,11 @@ public class ZKUtil { int retry = conf.getInt("zookeeper.recovery.retry", 3); int retryIntervalMillis = conf.getInt("zookeeper.recovery.retry.intervalmill", 1000); +int maxSleepTime = conf.getInt("zookeeper.recovery.retry.maxsleeptime", 6); zkDumpConnectionTimeOut = conf.getInt("zookeeper.dump.connection.timeout", 1000); return new RecoverableZooKeeper(ensemble, timeout, watcher, -retry, retryIntervalMillis, identifier); +retry, retryIntervalMillis, maxSleepTime, identifier); } /** http://git-wip-us.apache.org/repos/asf/hbase/blob/d137991c/hbase-common/src/main/resources/hbase-default.xml -- diff --git a/hbase-common/src/main/resources/hbase-default.xml b/hbase-common/src/main/resources/hbase-default.xml index a6e37ef..70c638b 100644 --- a/hbase-common/src/main/resources/hbase-default.xml +++ b/hbase-common/src/main/resources/hbase-default.xml @@ -96,6 +96,13 @@ possible configurations would overwhelm and obscure the important. and running --> +zookeeper.recovery.retry.maxsleeptime +6 +Max sleep time before retry zookeeper operations in milliseconds, +a max time is needed here so that sleep time won't grow unboundedly + + +