[ 
https://issues.apache.org/jira/browse/HBASE-20159?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16419220#comment-16419220
 ] 

Ted Yu commented on HBASE-20159:
--------------------------------

It seems the new test is flaky:
{code}
testMasterSwitch(org.apache.hadoop.hbase.client.TestSeparateClientZKCluster)  
Time elapsed: 0.293 s  <<< ERROR!
java.lang.NullPointerException
  at 
org.apache.hadoop.hbase.client.TestSeparateClientZKCluster.testMasterSwitch(TestSeparateClientZKCluster.java:134)
{code}
The following loop doesn't check whether cluster.getMaster() returns null:
{code}
      while (!cluster.getMaster().isInitialized()) {
{code}

Yu:
See if the following addendum is good by you:
{code}
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSeparateClientZKCluster.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSeparateClientZKClu
index d7caac6..ae0a824 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSeparateClientZKCluster.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSeparateClientZKCluster.java
@@ -131,7 +131,7 @@ public class TestSeparateClientZKCluster {
       while (!master.isShutDown()) {
         Thread.sleep(200);
       }
-      while (!cluster.getMaster().isInitialized()) {
+      while (cluster.getMaster() == null || 
!cluster.getMaster().isInitialized()) {
         Thread.sleep(200);
       }
       // confirm client access still works
{code}

> Support using separate ZK quorums for client
> --------------------------------------------
>
>                 Key: HBASE-20159
>                 URL: https://issues.apache.org/jira/browse/HBASE-20159
>             Project: HBase
>          Issue Type: New Feature
>          Components: Client, Operability, Zookeeper
>            Reporter: Yu Li
>            Assignee: Yu Li
>            Priority: Major
>             Fix For: 3.0.0, 2.1.0
>
>         Attachments: HBASE-20159.patch, HBASE-20159.v2.patch, 
> HBASE-20159.v3.patch
>
>
> Currently we are using the same zookeeper quorums for client and server, 
> which makes us under risk that if some client connection boost exhausted 
> zookeeper, RegionServer might abort due to zookeeper session loss. Actually 
> we have suffered from this many times in production.
> Here we propose to allow client to use different ZK quorums, through below 
> settings:
> {noformat}
> hbase.client.zookeeper.quorum
> hbase.client.zookeeper.property.clientPort
> hbase.client.zookeeper.observer.mode
> {noformat}
> The first two are for specifying client zookeeper properties, and the third 
> one indicating whether the client ZK nodes are in observer mode. If the 
> client ZK are not observer nodes, HMaster will take responsibility to 
> synchronize necessary meta information (such as meta location and master 
> address, etc.) from server to client ZK



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to