Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHOENIX-5852 The zkConnectionString in LoadBalance is incorrect #28

Closed
wants to merge 1 commit into from

Conversation

ZhaoBQ
Copy link
Contributor

@ZhaoBQ ZhaoBQ commented Apr 16, 2020

@infraio
Copy link
Contributor

infraio commented Apr 20, 2020

Add a ut for this?

@ZhaoBQ
Copy link
Contributor Author

ZhaoBQ commented Apr 22, 2020

Hi @infraio , a ut has been added.

"localhost"),configuration.get(QueryServerProperties.ZOOKEEPER_PORT_ATTRIB,"2181"));
String[] serverHosts = configuration.getStrings(QueryServerProperties.ZOOKEEPER_QUORUM_ATTRIB, "localhost");
String clientPort = configuration.get(QueryServerProperties.ZOOKEEPER_PORT_ATTRIB, "2181");
StringBuilder zkConnectionString = new StringBuilder();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just call ZKConfig.standardizeZKQuorumServerString() from HBase?
We are pulling in hbase-common anyways.

@@ -139,6 +142,37 @@ public void testSingletonPropertyForLoadBalancer(){
Assert.assertTrue(" the load balancer is not singleton",loadBalancer == anotherloadBalancerRef );
}

@Test
public void testZkConnectString() {
// server port is different from the port which is set by user
Copy link
Contributor

@stoty stoty May 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit Technically, this is a UT, but we tend not worry about the distinction much.
(The test is fine as is, but some may argue that it should be in src/test, not src/it )

@ZhaoBQ
Copy link
Contributor Author

ZhaoBQ commented May 17, 2020

Fixed as you said. Please review @stoty

@stoty
Copy link
Contributor

stoty commented May 17, 2020

Committed. Thanks for the fix @ZhaoBQ

@stoty stoty closed this May 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants