xyuanlu commented on code in PR #2099:
URL: https://github.com/apache/helix/pull/2099#discussion_r873975459
##########
helix-core/src/main/java/org/apache/helix/HelixPropertyFactory.java:
##########
@@ -80,20 +80,23 @@ public HelixManagerProperty getHelixManagerProperty(String
zkAddress, String clu
* @param clusterName
* @return
*/
- public static CloudConfig getCloudConfig(String zkAddress, String
clusterName) {
+ public static CloudConfig getCloudConfig(String zkAddress, String
clusterName,
+ RealmAwareZkClient.RealmAwareZkConnectionConfig
realmAwareZkConnectionConfig) {
Review Comment:
TFTR.
It is possible, if the needed zk routing data is not provided, it will fall
back to reading system config.
in RealAwareZkClient:
```
static MetadataStoreRoutingData getMetadataStoreRoutingData(
RealmAwareZkConnectionConfig connectionConfig) throws
InvalidRoutingDataException {
String routingDataSourceEndpoint =
connectionConfig.getRoutingDataSourceEndpoint();
if (routingDataSourceEndpoint == null ||
routingDataSourceEndpoint.isEmpty()) {
// If endpoint is not given explicitly, use HTTP and the endpoint set
in System Properties
return RoutingDataManager.getInstance().getMetadataStoreRoutingData();
}
where in
public MetadataStoreRoutingData getMetadataStoreRoutingData() throws
InvalidRoutingDataException {
if (_defaultMsdsEndpoint == null || _defaultMsdsEndpoint.isEmpty()) {
throw new IllegalStateException(
"HttpRoutingDataReader was unable to find a valid MSDS endpoint
String in System "
+ "Properties!");
}
return getMetadataStoreRoutingData(RoutingDataReaderType.HTTP,
_defaultMsdsEndpoint);
}
'''
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]