timsants commented on code in PR #8856:
URL: https://github.com/apache/pinot/pull/8856#discussion_r892904111
##########
pinot-common/src/main/java/org/apache/pinot/common/helix/ExtraInstanceConfig.java:
##########
@@ -44,4 +45,42 @@ public String getTlsPort() {
public void setTlsPort(String tlsPort) {
_proxy.getRecord().setSimpleField(PinotInstanceConfigProperty.PINOT_TLS_PORT.toString(),
tlsPort);
}
+
+ /**
+ * Returns an instance URL from the InstanceConfig. Will set the appropriate
protocol and port.
+ */
+ public String getComponentUrl() {
+ String hostName = _proxy.getHostName();
+ // Backward-compatible with legacy hostname of format
'Controller_<hostname>'
Review Comment:
I didn't see a specific example of this. I just noticed that other places
that were parsing the hostname was doing the same. E.g.
[PinotHelixResourceManager](https://github.com/apache/pinot/blob/master/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java#L221)
--
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]