Skip to content

Commit

Permalink
Remove unused code from our restore tooling.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattl-netflix committed May 4, 2024
1 parent 7bb2a38 commit ce6c7c1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
25 changes: 0 additions & 25 deletions priam/src/main/java/com/netflix/priam/restore/AbstractRestore.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@
*/
public abstract class AbstractRestore extends Task implements IRestoreStrategy {
private static final Logger logger = LoggerFactory.getLogger(AbstractRestore.class);
private static final String JOBNAME = "AbstractRestore";
private static final String SYSTEM_KEYSPACE = "system";
private static BigInteger restoreToken;
final IBackupFileSystem fs;
final Sleeper sleeper;
Expand All @@ -75,7 +73,6 @@ public abstract class AbstractRestore extends Task implements IRestoreStrategy {
public AbstractRestore(
IConfiguration config,
IBackupFileSystem fs,
String name,
Sleeper sleeper,
Provider<AbstractBackupPath> pathProvider,
InstanceIdentity instanceIdentity,
Expand Down Expand Up @@ -267,26 +264,4 @@ public void restore(DateUtil.DateRange dateRange) throws Exception {
* @throws Exception If there is any error in downloading file from the remote file system.
*/
protected abstract Future<Path> downloadFile(final AbstractBackupPath path) throws Exception;

final class BoundedList<E> extends LinkedList<E> {

private final int limit;

BoundedList(int limit) {
this.limit = limit;
}

@Override
public boolean add(E o) {
super.add(o);
while (size() > limit) {
super.remove();
}
return true;
}
}

public final int getDownloadTasksQueued() {
return fs.getDownloadTasksQueued();
}
}
4 changes: 0 additions & 4 deletions priam/src/main/java/com/netflix/priam/restore/Restore.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,11 @@
import javax.inject.Inject;
import javax.inject.Provider;
import javax.inject.Singleton;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/** Main class for restoring data from backup. Backup restored using this way are not encrypted. */
@Singleton
public class Restore extends AbstractRestore {
public static final String JOBNAME = "AUTO_RESTORE_JOB";
private static final Logger logger = LoggerFactory.getLogger(Restore.class);

@Inject
public Restore(
Expand All @@ -53,7 +50,6 @@ public Restore(
super(
config,
fs,
JOBNAME,
sleeper,
pathProvider,
instanceIdentity,
Expand Down

0 comments on commit ce6c7c1

Please sign in to comment.