Skip to content
Browse files

commiting some minor formating and file checks.

  • Loading branch information...
1 parent 79e974a commit 4f0bc79242d1ba1d81d9ee3a8b5dfff2011b2c7a @Vijay2win Vijay2win committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/main/java/com/netflix/priam/backup/IncrementalRestore.java
View
6 src/main/java/com/netflix/priam/backup/IncrementalRestore.java
@@ -18,6 +18,7 @@
import java.io.File;
import java.util.Calendar;
import java.util.Collection;
+import java.util.Date;
import java.util.Iterator;
/*
@@ -58,12 +59,13 @@ public void execute() throws Exception
priamServer.getId().getInstance().setToken(restoreToken.toString());
}
- Iterator<AbstractBackupPath> incrementals = fs.list(prefix, tracker.first().time, Calendar.getInstance().getTime());
+ Date start = tracker.first().time;
+ Iterator<AbstractBackupPath> incrementals = fs.list(prefix, start, Calendar.getInstance().getTime());
FileUtils.createDirectory(restoreDir); // create restore dir.
while (incrementals.hasNext())
{
AbstractBackupPath temp = incrementals.next();
- if (temp.type == BackupFileType.SST && tracker.contains(temp))
+ if (tracker.contains(temp) || start.compareTo(temp.time) >= 0)
continue;
if (temp.getType() != BackupFileType.SST)
continue;

0 comments on commit 4f0bc79

Please sign in to comment.
Something went wrong with that request. Please try again.