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



##########
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:
       Based on your second comment I think I got the point. We could simplify 
it to just use `getAddress` instead of constructing it ourselves. Let me try 
that one.




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