Apache9 commented on code in PR #5642:
URL: https://github.com/apache/hbase/pull/5642#discussion_r1460449850


##########
hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java:
##########
@@ -143,11 +143,10 @@ public static ServerName valueOf(final String hostname, 
final int port, final lo
    * instances, though we may return a shared immutable object as an internal 
optimization.
    */
   public static ServerName valueOf(final String serverName) {
-    int firstSep = serverName.indexOf(SERVERNAME_SEPARATOR);
-    int lastSep = serverName.lastIndexOf(SERVERNAME_SEPARATOR);
-    String hostname = serverName.substring(0, firstSep);
-    int port = Integer.parseInt(serverName.substring(firstSep + 1, lastSep));
-    long startCode = Long.parseLong(serverName.substring(lastSep + 1));
+    String[] splits = serverName.split(",");

Review Comment:
   ServerName is IA.Public so we should not change the behavior of its method.
   
   So how do other shell commands deal with this problem?



-- 
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]

Reply via email to