hbase git commit: HBASE-19102 TestZooKeeperMainServer fails with KeeperException Reapplication after fixing compile issue.
Repository: hbase Updated Branches: refs/heads/branch-1 f4b34675c -> a2ae58f6e HBASE-19102 TestZooKeeperMainServer fails with KeeperException Reapplication after fixing compile issue. Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/a2ae58f6 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/a2ae58f6 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/a2ae58f6 Branch: refs/heads/branch-1 Commit: a2ae58f6eebe41a47bfb082d340323c4385f0620 Parents: f4b3467 Author: Michael StackAuthored: Mon Nov 6 20:30:14 2017 -0800 Committer: Michael Stack Committed: Mon Nov 6 20:40:14 2017 -0800 -- .../hadoop/hbase/zookeeper/ZooKeeperMainServer.java | 12 1 file changed, 12 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/a2ae58f6/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java index e81da59..92460fe 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java @@ -20,6 +20,7 @@ package org.apache.hadoop.hbase.zookeeper; import java.io.IOException; +import java.util.concurrent.TimeUnit; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration; @@ -48,6 +49,15 @@ public class ZooKeeperMainServer { public HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain(String[] args) throws IOException, InterruptedException { super(args); + // Make sure we are connected before we proceed. Can take a while on some systems. If we + // run the command without being connected, we get ConnectionLoss KeeperErrorConnection... + long startTime = System.currentTimeMillis(); + while (!this.zk.getState().isConnected()) { +Thread.sleep(1); +if ((System.currentTimeMillis() - startTime) > 1) { + throw new InterruptedException("Failed connect " + this.zk); +} + } } /** @@ -100,6 +110,8 @@ public class ZooKeeperMainServer { } } // If command-line arguments, run our hack so they are executed. +// ZOOKEEPER-1897 was committed to zookeeper-3.4.6 but elsewhere in this class we say +// 3.4.6 breaks command-processing; TODO. if (hasCommandLineArguments(args)) { HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain zkm = new HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain(newArgs);
hbase git commit: HBASE-19102 TestZooKeeperMainServer fails with KeeperException Reapplication after fixing compile issue.
Repository: hbase Updated Branches: refs/heads/branch-1.3 df419a168 -> 123f765eb HBASE-19102 TestZooKeeperMainServer fails with KeeperException Reapplication after fixing compile issue. Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/123f765e Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/123f765e Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/123f765e Branch: refs/heads/branch-1.3 Commit: 123f765eb408d5ccf3ed3e4a2cd247eb2c1bc305 Parents: df419a1 Author: Michael StackAuthored: Mon Nov 6 20:30:14 2017 -0800 Committer: Michael Stack Committed: Mon Nov 6 20:39:12 2017 -0800 -- .../hadoop/hbase/zookeeper/ZooKeeperMainServer.java | 12 1 file changed, 12 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/123f765e/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java index e81da59..92460fe 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java @@ -20,6 +20,7 @@ package org.apache.hadoop.hbase.zookeeper; import java.io.IOException; +import java.util.concurrent.TimeUnit; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration; @@ -48,6 +49,15 @@ public class ZooKeeperMainServer { public HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain(String[] args) throws IOException, InterruptedException { super(args); + // Make sure we are connected before we proceed. Can take a while on some systems. If we + // run the command without being connected, we get ConnectionLoss KeeperErrorConnection... + long startTime = System.currentTimeMillis(); + while (!this.zk.getState().isConnected()) { +Thread.sleep(1); +if ((System.currentTimeMillis() - startTime) > 1) { + throw new InterruptedException("Failed connect " + this.zk); +} + } } /** @@ -100,6 +110,8 @@ public class ZooKeeperMainServer { } } // If command-line arguments, run our hack so they are executed. +// ZOOKEEPER-1897 was committed to zookeeper-3.4.6 but elsewhere in this class we say +// 3.4.6 breaks command-processing; TODO. if (hasCommandLineArguments(args)) { HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain zkm = new HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain(newArgs);
hbase git commit: HBASE-19102 TestZooKeeperMainServer fails with KeeperException Reapplication after fixing compile issue.
Repository: hbase Updated Branches: refs/heads/branch-1.4 b01b7168d -> afa1b9150 HBASE-19102 TestZooKeeperMainServer fails with KeeperException Reapplication after fixing compile issue. Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/afa1b915 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/afa1b915 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/afa1b915 Branch: refs/heads/branch-1.4 Commit: afa1b915098eff226577b17dc3f22d31fe9cd215 Parents: b01b716 Author: Michael StackAuthored: Mon Nov 6 20:30:14 2017 -0800 Committer: Michael Stack Committed: Mon Nov 6 20:39:45 2017 -0800 -- .../hadoop/hbase/zookeeper/ZooKeeperMainServer.java | 12 1 file changed, 12 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/afa1b915/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java index e81da59..92460fe 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java @@ -20,6 +20,7 @@ package org.apache.hadoop.hbase.zookeeper; import java.io.IOException; +import java.util.concurrent.TimeUnit; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration; @@ -48,6 +49,15 @@ public class ZooKeeperMainServer { public HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain(String[] args) throws IOException, InterruptedException { super(args); + // Make sure we are connected before we proceed. Can take a while on some systems. If we + // run the command without being connected, we get ConnectionLoss KeeperErrorConnection... + long startTime = System.currentTimeMillis(); + while (!this.zk.getState().isConnected()) { +Thread.sleep(1); +if ((System.currentTimeMillis() - startTime) > 1) { + throw new InterruptedException("Failed connect " + this.zk); +} + } } /** @@ -100,6 +110,8 @@ public class ZooKeeperMainServer { } } // If command-line arguments, run our hack so they are executed. +// ZOOKEEPER-1897 was committed to zookeeper-3.4.6 but elsewhere in this class we say +// 3.4.6 breaks command-processing; TODO. if (hasCommandLineArguments(args)) { HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain zkm = new HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain(newArgs);
hbase git commit: HBASE-19102 TestZooKeeperMainServer fails with KeeperException Reapplication after fixing compile issue.
Repository: hbase Updated Branches: refs/heads/branch-1.2 4e9136e03 -> 498bcba09 HBASE-19102 TestZooKeeperMainServer fails with KeeperException Reapplication after fixing compile issue. Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/498bcba0 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/498bcba0 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/498bcba0 Branch: refs/heads/branch-1.2 Commit: 498bcba095b7f108498d025e862a3bb741416b1d Parents: 4e9136e Author: Michael StackAuthored: Mon Nov 6 20:30:14 2017 -0800 Committer: Michael Stack Committed: Mon Nov 6 20:38:45 2017 -0800 -- .../hadoop/hbase/zookeeper/ZooKeeperMainServer.java | 12 1 file changed, 12 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hbase/blob/498bcba0/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java -- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java index e81da59..92460fe 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServer.java @@ -20,6 +20,7 @@ package org.apache.hadoop.hbase.zookeeper; import java.io.IOException; +import java.util.concurrent.TimeUnit; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration; @@ -48,6 +49,15 @@ public class ZooKeeperMainServer { public HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain(String[] args) throws IOException, InterruptedException { super(args); + // Make sure we are connected before we proceed. Can take a while on some systems. If we + // run the command without being connected, we get ConnectionLoss KeeperErrorConnection... + long startTime = System.currentTimeMillis(); + while (!this.zk.getState().isConnected()) { +Thread.sleep(1); +if ((System.currentTimeMillis() - startTime) > 1) { + throw new InterruptedException("Failed connect " + this.zk); +} + } } /** @@ -100,6 +110,8 @@ public class ZooKeeperMainServer { } } // If command-line arguments, run our hack so they are executed. +// ZOOKEEPER-1897 was committed to zookeeper-3.4.6 but elsewhere in this class we say +// 3.4.6 breaks command-processing; TODO. if (hasCommandLineArguments(args)) { HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain zkm = new HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain(newArgs);