AndreyBozhko commented on code in PR #2473:
URL: https://github.com/apache/solr/pull/2473#discussion_r1610156568


##########
solr/solrj-zookeeper/src/java/org/apache/solr/common/cloud/ZkStateReader.java:
##########
@@ -1331,12 +1331,24 @@ public ConfigData getSecurityProps(boolean getFresh) {
    * Returns the baseURL corresponding to a given node's nodeName -- NOTE: 
does not (currently)
    * imply that the nodeName (or resulting baseURL) exists in the cluster.
    *
-   * @lucene.experimental
+   * @param nodeName name of the node
+   * @return url that looks like {@code https://localhost:8983/solr}
    */
   public String getBaseUrlForNodeName(final String nodeName) {
     return Utils.getBaseUrlForNodeName(nodeName, 
getClusterProperty(URL_SCHEME, "http"));
   }
 
+  /**
+   * Returns the V2 baseURL corresponding to a given node's nodeName -- NOTE: 
does not (currently)
+   * imply that the nodeName (or resulting baseURL) exists in the cluster.
+   *
+   * @param nodeName name of the node
+   * @return url that looks like {@code https://localhost:8983/api}
+   */
+  public String getBaseUrlV2ForNodeName(final String nodeName) {
+    return Utils.getBaseUrlForNodeName(nodeName, 
getClusterProperty(URL_SCHEME, "http"), true);

Review Comment:
   It's actually a different overload of the method which accepts `boolean 
isV2` parameter. But I agree - perhaps it's more clear to also use the same 
overload in line 1338, and pass `isV2 = false` explicitly.
   
   
https://github.com/apache/solr/blob/3837eebcd73e103c083d7b02bdf6904d08fc34b5/solr/solrj/src/java/org/apache/solr/common/util/Utils.java#L719-L738



-- 
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: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to