pkuwm commented on a change in pull request #856: Instrument ConfigAccessor's
constructors
URL: https://github.com/apache/helix/pull/856#discussion_r387866176
##########
File path: helix-core/src/main/java/org/apache/helix/ConfigAccessor.java
##########
@@ -123,9 +123,22 @@ public ConfigAccessor(HelixZkClient zkClient) {
* @param zkAddress
*/
public ConfigAccessor(String zkAddress) {
- _zkClient = SharedZkClientFactory.getInstance()
- .buildZkClient(new HelixZkClient.ZkConnectionConfig(zkAddress),
- new HelixZkClient.ZkClientConfig().setZkSerializer(new
ZNRecordSerializer()));
+ // First, attempt to connect on multi-realm mode using FederatedZkClient
+ RealmAwareZkClient zkClient;
+ try {
+ zkClient = new FederatedZkClient(
+ new
RealmAwareZkClient.RealmAwareZkConnectionConfig.Builder().build(),
+ new RealmAwareZkClient.RealmAwareZkClientConfig());
+ } catch (IOException | InvalidRoutingDataException e) {
Review comment:
`IllegalStateException` floated from HttpRoutingDataReader should also be
caught.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]