HorizonNet commented on a change in pull request #1639:
URL: https://github.com/apache/hbase/pull/1639#discussion_r419593177



##########
File path: 
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupUtils.java
##########
@@ -367,9 +367,10 @@ public static String parseHostFromOldLog(Path p) {
       String n = p.getName();
       int idx = n.lastIndexOf(LOGNAME_SEPARATOR);
       String s = URLDecoder.decode(n.substring(0, idx), "UTF8");
-      return ServerName.parseHostname(s) + ":" + ServerName.parsePort(s);
+      final ServerName serverName = ServerName.valueOf(s);
+      return serverName.getHostname() + ":" + serverName.getPort();

Review comment:
       For `ServerName` I would go with `getHostname` and `getPort` as it is 
shorter and we internally point to the address. If we want just a single way to 
get the information we should get rid of the shortcut methods, but I would 
stick with the shortcuts.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to