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


##########
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:
   Should we maintain their consistency?
   1. If the serverName supports the form of host name and port, then the 
relevant client methods can also maintain consistency.
   2. Remove support from compact_ rs and clear_ compaction_ queues,It doesn't 
have much effect either.
   
   Of course, maybe we have other plans. Do you have any ideas?



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