timsants commented on code in PR #8856:
URL: https://github.com/apache/pinot/pull/8856#discussion_r891922823
##########
pinot-common/src/main/java/org/apache/pinot/common/utils/config/InstanceUtils.java:
##########
@@ -119,4 +122,36 @@ public static void
updateHelixInstanceConfig(InstanceConfig instanceConfig, Inst
mapFields.remove(POOL_KEY);
}
}
+
+ /**
+ * Returns an instance admin URL from a given InstanceConfig. Will decipher
whether the URL protocol should
+ * be HTTP vs HTTPS.
+ */
+ public static URL getInstanceURL(InstanceConfig instanceConfig) {
+ String hostname = instanceConfig.getHostName();
+ if (hostname.startsWith(Helix.PREFIX_OF_SERVER_INSTANCE)) {
Review Comment:
Will create a method that supports all the components, checking for the
different prefixes.
--
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]