vinayakphegde commented on code in PR #7090:
URL: https://github.com/apache/hbase/pull/7090#discussion_r2142995519


##########
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/BackupCommands.java:
##########
@@ -966,6 +988,34 @@ void updateBackupTableStartTimes(BackupSystemTable 
sysTable, long cutoffTimestam
       }
     }
 
+    private void removeAllTablesFromContinuousBackup(BackupSystemTable 
sysTable)
+      throws IOException {
+      Map<TableName, Long> allTables = sysTable.getContinuousBackupTableSet();
+      if (!allTables.isEmpty()) {
+        sysTable.removeContinuousBackupTableSet(allTables.keySet());
+        System.out.println("Removed all tables from continuous backup 
metadata.");
+      }
+    }
+
+    private void deleteAllBackupWALFiles(Configuration conf, String 
backupWalDir)
+      throws IOException {
+      try {
+        FileSystem fs = FileSystem.get(conf);
+        Path walPath = new Path(backupWalDir);
+        if (fs.exists(walPath)) {
+          FileStatus[] contents = fs.listStatus(walPath);
+          for (FileStatus item : contents) {
+            fs.delete(item.getPath(), true); // recursive delete of each child
+          }
+          System.out.println("Deleted all contents under WAL directory: " + 
backupWalDir);
+        }
+      } catch (IOException e) {

Review Comment:
   You're right — the backup and restore framework needs proper logging. I've 
already created a JIRA for this: 
[HBASE-29374](https://issues.apache.org/jira/browse/HBASE-29374). We'll address 
this issue as part of that.



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