Sigma-Ma commented on code in PR #8512:
URL: https://github.com/apache/hbase/pull/8512#discussion_r3725514273


##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/util/BackupUtils.java:
##########
@@ -332,6 +332,10 @@ public static String parseHostFromOldLog(Path p) {
     if (p.getName().endsWith(MasterRegionFactory.ARCHIVED_WAL_SUFFIX)) {
       return null;
     }
+    Path parent = p.getParent();
+    if (parent != null && ServerName.isFullServerName(parent.getName())) {
+      return ServerName.valueOf(parent.getName()).getAddress().toString();
+    }

Review Comment:
   I have added direct coverage in TestBackupUtils. The test constructs 
oldWALs/<serverName>/wal.<timestamp> and verifies that 
BackupUtils.parseHostFromOldLog returns the expected host:port from the parent 
ServerName directory.



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