desaikomal commented on code in PR #2575:
URL: https://github.com/apache/helix/pull/2575#discussion_r1274358401
##########
helix-core/src/main/java/org/apache/helix/model/RESTConfig.java:
##########
@@ -67,12 +68,19 @@ public String get(SimpleFields property) {
*/
public String getBaseUrl(String instance) {
String baseUrl = get(RESTConfig.SimpleFields.CUSTOMIZED_HEALTH_URL);
+
// pre-assumption of the url, must be format of "http://*/path", the
wildcard is replaceable by
// the instance vip
- assert baseUrl.contains("*");
- // pre-assumption of the instance name, must be format of
<instanceVip>_<port>
- assert instance.contains("_");
- String instanceVip = instance.substring(0, instance.indexOf('_'));
+ if (baseUrl == null || !baseUrl.contains("*")) {
+ throw new HelixException("Invalid CUSTOMIZED_HEALTH_URL in REST config:
" + baseUrl);
+ }
+
+ String instanceVip = instance;
Review Comment:
this is ok, but helix does have convention of naming hostname_port.
--
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]