rda3mon commented on a change in pull request #3359:
URL: https://github.com/apache/hbase/pull/3359#discussion_r677946644



##########
File path: 
hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/impl/IncrementalBackupManager.java
##########
@@ -99,68 +95,19 @@ public IncrementalBackupManager(Connection conn, 
Configuration conf) throws IOEx
     newTimestamps = readRegionServerLastLogRollResult();
 
     logList = getLogFilesForNewBackup(previousTimestampMins, newTimestamps, 
conf, savedStartCode);
-    List<WALItem> logFromSystemTable =
-        getLogFilesFromBackupSystem(previousTimestampMins, newTimestamps, 
getBackupInfo()
-            .getBackupRootDir());
-    logList = excludeAlreadyBackedUpAndProcV2WALs(logList, logFromSystemTable);
+    logList = excludeProcV2WALs(logList);
     backupInfo.setIncrBackupFileList(logList);
 
     return newTimestamps;
   }
 
-  /**
-   * Get list of WAL files eligible for incremental backup.
-   *
-   * @return list of WAL files
-   * @throws IOException if getting the list of WAL files fails
-   */
-  public List<String> getIncrBackupLogFileList() throws IOException {
-    List<String> logList;
-    HashMap<String, Long> newTimestamps;
-    HashMap<String, Long> previousTimestampMins;
-
-    String savedStartCode = readBackupStartCode();
-
-    // key: tableName
-    // value: <RegionServer,PreviousTimeStamp>
-    HashMap<TableName, HashMap<String, Long>> previousTimestampMap = 
readLogTimestampMap();
-
-    previousTimestampMins = 
BackupUtils.getRSLogTimestampMins(previousTimestampMap);
-
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("StartCode " + savedStartCode + "for backupID " + 
backupInfo.getBackupId());
-    }
-    // get all new log files from .logs and .oldlogs after last TS and before 
new timestamp
-    if (savedStartCode == null || previousTimestampMins == null
-        || previousTimestampMins.isEmpty()) {
-      throw new IOException(
-          "Cannot read any previous back up timestamps from backup system 
table. "
-              + "In order to create an incremental backup, at least one full 
backup is needed.");
-    }
-
-    newTimestamps = readRegionServerLastLogRollResult();
-
-    logList = getLogFilesForNewBackup(previousTimestampMins, newTimestamps, 
conf, savedStartCode);
-    List<WALItem> logFromSystemTable =
-        getLogFilesFromBackupSystem(previousTimestampMins, newTimestamps, 
getBackupInfo()
-            .getBackupRootDir());
-
-    logList = excludeAlreadyBackedUpAndProcV2WALs(logList, logFromSystemTable);
-    backupInfo.setIncrBackupFileList(logList);
-
-    return logList;
-  }
-
-  private List<String> excludeAlreadyBackedUpAndProcV2WALs(List<String> 
logList,
-      List<WALItem> logFromSystemTable) {
-    Set<String> walFileNameSet = convertToSet(logFromSystemTable);
-
+  private List<String> excludeProcV2WALs(List<String> logList) {
     List<String> list = new ArrayList<>();
     for (int i=0; i < logList.size(); i++) {
       Path p = new Path(logList.get(i));
       String name  = p.getName();
 
-      if (walFileNameSet.contains(name) || 
name.startsWith(WALProcedureStore.LOG_PREFIX)) {
+      if (name.startsWith(WALProcedureStore.LOG_PREFIX)) {

Review comment:
       Ack. Will raise it. 




-- 
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: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to