diff --git a/priam/src/main/java/com/netflix/priam/PriamServer.java b/priam/src/main/java/com/netflix/priam/PriamServer.java index 36c8f5103..2453e2c6d 100644 --- a/priam/src/main/java/com/netflix/priam/PriamServer.java +++ b/priam/src/main/java/com/netflix/priam/PriamServer.java @@ -16,8 +16,6 @@ */ package com.netflix.priam; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.priam.backup.BackupService; import com.netflix.priam.backupv2.BackupV2Service; import com.netflix.priam.cluster.management.ClusterManagementService; @@ -33,6 +31,8 @@ import com.netflix.priam.utils.Sleeper; import com.netflix.priam.utils.SystemUtils; import java.io.IOException; +import javax.inject.Inject; +import javax.inject.Singleton; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/aws/AWSMembership.java b/priam/src/main/java/com/netflix/priam/aws/AWSMembership.java index f9421aabe..d2dd296bd 100644 --- a/priam/src/main/java/com/netflix/priam/aws/AWSMembership.java +++ b/priam/src/main/java/com/netflix/priam/aws/AWSMembership.java @@ -25,13 +25,13 @@ import com.amazonaws.services.ec2.model.*; import com.amazonaws.services.ec2.model.Filter; import com.google.common.collect.ImmutableSet; -import com.google.inject.Inject; -import com.google.inject.name.Named; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.cred.ICredential; import com.netflix.priam.identity.IMembership; import com.netflix.priam.identity.config.InstanceInfo; import java.util.*; +import javax.inject.Inject; +import javax.inject.Named; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/aws/RemoteBackupPath.java b/priam/src/main/java/com/netflix/priam/aws/RemoteBackupPath.java index b3616d10a..2eb1fd09f 100644 --- a/priam/src/main/java/com/netflix/priam/aws/RemoteBackupPath.java +++ b/priam/src/main/java/com/netflix/priam/aws/RemoteBackupPath.java @@ -20,7 +20,6 @@ import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import com.google.inject.Inject; import com.netflix.priam.backup.AbstractBackupPath; import com.netflix.priam.compress.CompressionType; import com.netflix.priam.config.IConfiguration; @@ -33,6 +32,7 @@ import java.util.Date; import java.util.List; import java.util.Optional; +import javax.inject.Inject; /** * Represents location of an object on the remote file system. All the objects will be keyed with a diff --git a/priam/src/main/java/com/netflix/priam/aws/S3CrossAccountFileSystem.java b/priam/src/main/java/com/netflix/priam/aws/S3CrossAccountFileSystem.java index 0676b859a..5651ebb45 100755 --- a/priam/src/main/java/com/netflix/priam/aws/S3CrossAccountFileSystem.java +++ b/priam/src/main/java/com/netflix/priam/aws/S3CrossAccountFileSystem.java @@ -15,13 +15,13 @@ import com.amazonaws.services.s3.AmazonS3; import com.amazonaws.services.s3.AmazonS3Client; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; import com.netflix.priam.aws.auth.IS3Credential; import com.netflix.priam.backup.IBackupFileSystem; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.identity.config.InstanceInfo; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/aws/S3EncryptedFileSystem.java b/priam/src/main/java/com/netflix/priam/aws/S3EncryptedFileSystem.java index 019a620a9..098dcb62a 100755 --- a/priam/src/main/java/com/netflix/priam/aws/S3EncryptedFileSystem.java +++ b/priam/src/main/java/com/netflix/priam/aws/S3EncryptedFileSystem.java @@ -18,10 +18,6 @@ import com.amazonaws.services.s3.model.InitiateMultipartUploadRequest; import com.amazonaws.services.s3.model.InitiateMultipartUploadResult; import com.amazonaws.services.s3.model.PartETag; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.inject.name.Named; import com.netflix.priam.backup.AbstractBackupPath; import com.netflix.priam.backup.BackupRestoreException; import com.netflix.priam.backup.DynamicRateLimiter; @@ -42,6 +38,10 @@ import java.util.Collections; import java.util.Iterator; import java.util.List; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Provider; +import javax.inject.Singleton; import org.apache.commons.io.IOUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/aws/S3FileSystem.java b/priam/src/main/java/com/netflix/priam/aws/S3FileSystem.java index ce597c13e..351dcc448 100644 --- a/priam/src/main/java/com/netflix/priam/aws/S3FileSystem.java +++ b/priam/src/main/java/com/netflix/priam/aws/S3FileSystem.java @@ -20,10 +20,6 @@ import com.amazonaws.services.s3.S3ResponseMetadata; import com.amazonaws.services.s3.model.*; import com.google.common.base.Preconditions; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.inject.name.Named; import com.netflix.priam.aws.auth.IS3Credential; import com.netflix.priam.backup.AbstractBackupPath; import com.netflix.priam.backup.BackupRestoreException; @@ -47,6 +43,10 @@ import java.util.Iterator; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Provider; +import javax.inject.Singleton; import org.apache.commons.io.IOUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/aws/S3FileSystemBase.java b/priam/src/main/java/com/netflix/priam/aws/S3FileSystemBase.java index 5703424f2..ad3afa3c0 100755 --- a/priam/src/main/java/com/netflix/priam/aws/S3FileSystemBase.java +++ b/priam/src/main/java/com/netflix/priam/aws/S3FileSystemBase.java @@ -22,7 +22,6 @@ import com.amazonaws.services.s3.model.lifecycle.*; import com.google.common.collect.Lists; import com.google.common.util.concurrent.RateLimiter; -import com.google.inject.Provider; import com.netflix.priam.backup.AbstractBackupPath; import com.netflix.priam.backup.AbstractFileSystem; import com.netflix.priam.backup.BackupRestoreException; @@ -37,6 +36,7 @@ import java.util.Optional; import java.util.concurrent.LinkedBlockingQueue; import java.util.stream.Collectors; +import javax.inject.Provider; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/aws/SDBInstanceData.java b/priam/src/main/java/com/netflix/priam/aws/SDBInstanceData.java index 1d0fe8a08..f0110c3bf 100644 --- a/priam/src/main/java/com/netflix/priam/aws/SDBInstanceData.java +++ b/priam/src/main/java/com/netflix/priam/aws/SDBInstanceData.java @@ -20,12 +20,12 @@ import com.amazonaws.services.simpledb.AmazonSimpleDB; import com.amazonaws.services.simpledb.AmazonSimpleDBClient; import com.amazonaws.services.simpledb.model.*; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.cred.ICredential; import com.netflix.priam.identity.PriamInstance; import java.util.*; +import javax.inject.Inject; +import javax.inject.Singleton; /** DAO for handling Instance identity information such as token, zone, region */ @Singleton diff --git a/priam/src/main/java/com/netflix/priam/aws/SDBInstanceFactory.java b/priam/src/main/java/com/netflix/priam/aws/SDBInstanceFactory.java index df80c0bb5..e59e49c73 100644 --- a/priam/src/main/java/com/netflix/priam/aws/SDBInstanceFactory.java +++ b/priam/src/main/java/com/netflix/priam/aws/SDBInstanceFactory.java @@ -18,13 +18,13 @@ import com.amazonaws.AmazonServiceException; import com.google.common.collect.ImmutableSet; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.priam.identity.IPriamInstanceFactory; import com.netflix.priam.identity.PriamInstance; import com.netflix.priam.identity.config.InstanceInfo; import java.util.*; import java.util.stream.Collectors; +import javax.inject.Inject; +import javax.inject.Singleton; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/aws/UpdateCleanupPolicy.java b/priam/src/main/java/com/netflix/priam/aws/UpdateCleanupPolicy.java index 56ca053ba..fc0e32438 100644 --- a/priam/src/main/java/com/netflix/priam/aws/UpdateCleanupPolicy.java +++ b/priam/src/main/java/com/netflix/priam/aws/UpdateCleanupPolicy.java @@ -16,15 +16,15 @@ */ package com.netflix.priam.aws; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import com.google.inject.name.Named; import com.netflix.priam.backup.IBackupFileSystem; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.scheduler.SimpleTimer; import com.netflix.priam.scheduler.Task; import com.netflix.priam.scheduler.TaskTimer; import com.netflix.priam.utils.RetryableCallable; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Singleton; /** Updates the cleanup policy for the bucket */ @Singleton diff --git a/priam/src/main/java/com/netflix/priam/aws/auth/EC2RoleAssumptionCredential.java b/priam/src/main/java/com/netflix/priam/aws/auth/EC2RoleAssumptionCredential.java index c01c92442..ef418dc7b 100644 --- a/priam/src/main/java/com/netflix/priam/aws/auth/EC2RoleAssumptionCredential.java +++ b/priam/src/main/java/com/netflix/priam/aws/auth/EC2RoleAssumptionCredential.java @@ -15,10 +15,10 @@ import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.auth.STSAssumeRoleSessionCredentialsProvider; -import com.google.inject.Inject; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.cred.ICredential; import com.netflix.priam.identity.config.InstanceInfo; +import javax.inject.Inject; public class EC2RoleAssumptionCredential implements ICredential { private static final String AWS_ROLE_ASSUMPTION_SESSION_NAME = "AwsRoleAssumptionSession"; diff --git a/priam/src/main/java/com/netflix/priam/aws/auth/S3RoleAssumptionCredential.java b/priam/src/main/java/com/netflix/priam/aws/auth/S3RoleAssumptionCredential.java index 21befc17b..d12d1bde7 100755 --- a/priam/src/main/java/com/netflix/priam/aws/auth/S3RoleAssumptionCredential.java +++ b/priam/src/main/java/com/netflix/priam/aws/auth/S3RoleAssumptionCredential.java @@ -16,10 +16,10 @@ import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.auth.STSAssumeRoleSessionCredentialsProvider; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.cred.ICredential; +import javax.inject.Inject; +import javax.inject.Singleton; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/backup/AbstractBackup.java b/priam/src/main/java/com/netflix/priam/backup/AbstractBackup.java index bd8cab2cc..8024b124d 100644 --- a/priam/src/main/java/com/netflix/priam/backup/AbstractBackup.java +++ b/priam/src/main/java/com/netflix/priam/backup/AbstractBackup.java @@ -16,7 +16,6 @@ */ package com.netflix.priam.backup; -import com.google.inject.Inject; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.scheduler.Task; import com.netflix.priam.utils.SystemUtils; @@ -29,6 +28,7 @@ import java.util.HashSet; import java.util.Optional; import java.util.Set; +import javax.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/backup/AbstractFileSystem.java b/priam/src/main/java/com/netflix/priam/backup/AbstractFileSystem.java index 4f31fb028..ba7f94865 100644 --- a/priam/src/main/java/com/netflix/priam/backup/AbstractFileSystem.java +++ b/priam/src/main/java/com/netflix/priam/backup/AbstractFileSystem.java @@ -25,8 +25,6 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; -import com.google.inject.Inject; -import com.google.inject.Provider; import com.netflix.priam.backup.AbstractBackupPath.BackupFileType; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.merics.BackupMetrics; @@ -44,6 +42,8 @@ import java.util.List; import java.util.Set; import java.util.concurrent.*; +import javax.inject.Inject; +import javax.inject.Provider; import org.apache.commons.collections4.iterators.FilterIterator; import org.apache.commons.collections4.iterators.TransformIterator; import org.apache.commons.io.FileUtils; diff --git a/priam/src/main/java/com/netflix/priam/backup/BackupFileSystemContext.java b/priam/src/main/java/com/netflix/priam/backup/BackupFileSystemContext.java index c8b319258..a39ffc0cf 100755 --- a/priam/src/main/java/com/netflix/priam/backup/BackupFileSystemContext.java +++ b/priam/src/main/java/com/netflix/priam/backup/BackupFileSystemContext.java @@ -13,9 +13,9 @@ */ package com.netflix.priam.backup; -import com.google.inject.Inject; -import com.google.inject.name.Named; import com.netflix.priam.config.IConfiguration; +import javax.inject.Inject; +import javax.inject.Named; public class BackupFileSystemContext implements IFileSystemContext { diff --git a/priam/src/main/java/com/netflix/priam/backup/BackupHelperImpl.java b/priam/src/main/java/com/netflix/priam/backup/BackupHelperImpl.java index c51de5e0a..9f13891f7 100644 --- a/priam/src/main/java/com/netflix/priam/backup/BackupHelperImpl.java +++ b/priam/src/main/java/com/netflix/priam/backup/BackupHelperImpl.java @@ -5,8 +5,6 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.util.concurrent.ListenableFuture; -import com.google.inject.Inject; -import com.google.inject.Provider; import com.netflix.priam.compress.CompressionType; import com.netflix.priam.config.BackupsToCompress; import com.netflix.priam.config.IConfiguration; @@ -17,6 +15,8 @@ import java.time.Instant; import java.util.Set; import java.util.stream.Stream; +import javax.inject.Inject; +import javax.inject.Provider; public class BackupHelperImpl implements BackupHelper { diff --git a/priam/src/main/java/com/netflix/priam/backup/BackupRestoreUtil.java b/priam/src/main/java/com/netflix/priam/backup/BackupRestoreUtil.java index 2293a2694..776a3d9f3 100644 --- a/priam/src/main/java/com/netflix/priam/backup/BackupRestoreUtil.java +++ b/priam/src/main/java/com/netflix/priam/backup/BackupRestoreUtil.java @@ -18,8 +18,6 @@ package com.netflix.priam.backup; import com.google.common.collect.ImmutableMap; -import com.google.inject.Inject; -import com.google.inject.Provider; import com.netflix.priam.backupv2.IMetaProxy; import com.netflix.priam.backupv2.MetaV2Proxy; import com.netflix.priam.utils.DateUtil; @@ -28,6 +26,8 @@ import java.util.*; import java.util.regex.Pattern; import java.util.stream.Collectors; +import javax.inject.Inject; +import javax.inject.Provider; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; diff --git a/priam/src/main/java/com/netflix/priam/backup/BackupService.java b/priam/src/main/java/com/netflix/priam/backup/BackupService.java index 64c750f8d..701b1e02c 100644 --- a/priam/src/main/java/com/netflix/priam/backup/BackupService.java +++ b/priam/src/main/java/com/netflix/priam/backup/BackupService.java @@ -17,7 +17,6 @@ package com.netflix.priam.backup; -import com.google.inject.Inject; import com.netflix.priam.aws.UpdateCleanupPolicy; import com.netflix.priam.config.IBackupRestoreConfig; import com.netflix.priam.config.IConfiguration; @@ -25,6 +24,7 @@ import com.netflix.priam.scheduler.PriamScheduler; import com.netflix.priam.scheduler.TaskTimer; import com.netflix.priam.tuner.CassandraTunerService; +import javax.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/backup/BackupStatusMgr.java b/priam/src/main/java/com/netflix/priam/backup/BackupStatusMgr.java index 36489e022..40c3bf695 100644 --- a/priam/src/main/java/com/netflix/priam/backup/BackupStatusMgr.java +++ b/priam/src/main/java/com/netflix/priam/backup/BackupStatusMgr.java @@ -13,8 +13,6 @@ */ package com.netflix.priam.backup; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.priam.health.InstanceState; import com.netflix.priam.utils.DateUtil; import com.netflix.priam.utils.MaxSizeHashMap; @@ -22,6 +20,8 @@ import java.time.temporal.ChronoUnit; import java.util.*; import java.util.stream.Collectors; +import javax.inject.Inject; +import javax.inject.Singleton; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/backup/BackupVerification.java b/priam/src/main/java/com/netflix/priam/backup/BackupVerification.java index 3dfc1bdfb..f0d73e350 100644 --- a/priam/src/main/java/com/netflix/priam/backup/BackupVerification.java +++ b/priam/src/main/java/com/netflix/priam/backup/BackupVerification.java @@ -13,10 +13,6 @@ */ package com.netflix.priam.backup; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.inject.name.Named; import com.netflix.priam.backupv2.IMetaProxy; import com.netflix.priam.scheduler.UnsupportedTypeException; import com.netflix.priam.utils.DateUtil; @@ -25,6 +21,10 @@ import java.nio.file.Paths; import java.time.Instant; import java.util.*; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Provider; +import javax.inject.Singleton; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/backup/CommitLogBackup.java b/priam/src/main/java/com/netflix/priam/backup/CommitLogBackup.java index 8de2b4dd0..a7f8f588e 100644 --- a/priam/src/main/java/com/netflix/priam/backup/CommitLogBackup.java +++ b/priam/src/main/java/com/netflix/priam/backup/CommitLogBackup.java @@ -14,13 +14,13 @@ package com.netflix.priam.backup; import com.google.common.collect.Lists; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.name.Named; import com.netflix.priam.backup.AbstractBackupPath.BackupFileType; import com.netflix.priam.utils.DateUtil; import java.io.File; import java.util.List; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Provider; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/backup/CommitLogBackupTask.java b/priam/src/main/java/com/netflix/priam/backup/CommitLogBackupTask.java index e4e059b11..d5cecdca0 100644 --- a/priam/src/main/java/com/netflix/priam/backup/CommitLogBackupTask.java +++ b/priam/src/main/java/com/netflix/priam/backup/CommitLogBackupTask.java @@ -13,12 +13,12 @@ */ package com.netflix.priam.backup; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.scheduler.SimpleTimer; import com.netflix.priam.scheduler.TaskTimer; import java.io.File; +import javax.inject.Inject; +import javax.inject.Singleton; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/backup/FileSnapshotStatusMgr.java b/priam/src/main/java/com/netflix/priam/backup/FileSnapshotStatusMgr.java index e59c5880d..2ac5d4dac 100644 --- a/priam/src/main/java/com/netflix/priam/backup/FileSnapshotStatusMgr.java +++ b/priam/src/main/java/com/netflix/priam/backup/FileSnapshotStatusMgr.java @@ -17,13 +17,13 @@ package com.netflix.priam.backup; -import com.google.inject.Inject; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.health.InstanceState; import com.netflix.priam.utils.MaxSizeHashMap; import java.io.*; import java.util.LinkedList; import java.util.Map; +import javax.inject.Inject; import javax.inject.Singleton; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/backup/IncrementalBackup.java b/priam/src/main/java/com/netflix/priam/backup/IncrementalBackup.java index 43d23bf66..8e2a9646e 100644 --- a/priam/src/main/java/com/netflix/priam/backup/IncrementalBackup.java +++ b/priam/src/main/java/com/netflix/priam/backup/IncrementalBackup.java @@ -20,8 +20,6 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.MoreExecutors; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.priam.backup.AbstractBackupPath.BackupFileType; import com.netflix.priam.backupv2.SnapshotMetaTask; import com.netflix.priam.config.IBackupRestoreConfig; @@ -31,6 +29,8 @@ import java.io.File; import java.nio.file.Path; import java.util.Set; +import javax.inject.Inject; +import javax.inject.Singleton; import org.apache.commons.io.FileUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/backup/MetaData.java b/priam/src/main/java/com/netflix/priam/backup/MetaData.java index 60dffbf62..5a716062c 100644 --- a/priam/src/main/java/com/netflix/priam/backup/MetaData.java +++ b/priam/src/main/java/com/netflix/priam/backup/MetaData.java @@ -16,8 +16,6 @@ */ package com.netflix.priam.backup; -import com.google.inject.Inject; -import com.google.inject.Provider; import com.netflix.priam.backup.AbstractBackupPath.BackupFileType; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.utils.DateUtil; @@ -27,6 +25,8 @@ import java.text.ParseException; import java.util.ArrayList; import java.util.List; +import javax.inject.Inject; +import javax.inject.Provider; import org.apache.commons.io.FileUtils; import org.json.simple.JSONArray; import org.slf4j.Logger; diff --git a/priam/src/main/java/com/netflix/priam/backup/SnapshotBackup.java b/priam/src/main/java/com/netflix/priam/backup/SnapshotBackup.java index fdde89fa8..ff82758ab 100644 --- a/priam/src/main/java/com/netflix/priam/backup/SnapshotBackup.java +++ b/priam/src/main/java/com/netflix/priam/backup/SnapshotBackup.java @@ -19,8 +19,6 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import com.google.common.util.concurrent.ListenableFuture; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.priam.backup.AbstractBackupPath.BackupFileType; import com.netflix.priam.backupv2.ForgottenFilesManager; import com.netflix.priam.config.IConfiguration; @@ -40,6 +38,8 @@ import java.util.concurrent.Future; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; +import javax.inject.Inject; +import javax.inject.Singleton; import org.apache.commons.io.FileUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/backupv2/BackupTTLTask.java b/priam/src/main/java/com/netflix/priam/backupv2/BackupTTLTask.java index 534bbff0a..cdbbd4c57 100644 --- a/priam/src/main/java/com/netflix/priam/backupv2/BackupTTLTask.java +++ b/priam/src/main/java/com/netflix/priam/backupv2/BackupTTLTask.java @@ -17,9 +17,6 @@ package com.netflix.priam.backupv2; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; import com.netflix.priam.backup.*; import com.netflix.priam.config.IBackupRestoreConfig; import com.netflix.priam.config.IConfiguration; @@ -36,7 +33,10 @@ import java.util.*; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; +import javax.inject.Inject; import javax.inject.Named; +import javax.inject.Provider; +import javax.inject.Singleton; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.math.Fraction; import org.slf4j.Logger; diff --git a/priam/src/main/java/com/netflix/priam/backupv2/BackupV2Service.java b/priam/src/main/java/com/netflix/priam/backupv2/BackupV2Service.java index 7889eaea7..71591e408 100644 --- a/priam/src/main/java/com/netflix/priam/backupv2/BackupV2Service.java +++ b/priam/src/main/java/com/netflix/priam/backupv2/BackupV2Service.java @@ -17,7 +17,6 @@ package com.netflix.priam.backupv2; -import com.google.inject.Inject; import com.netflix.priam.backup.IncrementalBackup; import com.netflix.priam.config.IBackupRestoreConfig; import com.netflix.priam.config.IConfiguration; @@ -26,6 +25,7 @@ import com.netflix.priam.scheduler.PriamScheduler; import com.netflix.priam.scheduler.TaskTimer; import com.netflix.priam.tuner.CassandraTunerService; +import javax.inject.Inject; /** * Encapsulate the backup service 2.0 - Execute all the tasks required to run backup service. diff --git a/priam/src/main/java/com/netflix/priam/backupv2/BackupVerificationTask.java b/priam/src/main/java/com/netflix/priam/backupv2/BackupVerificationTask.java index 926b8513c..435ae648c 100644 --- a/priam/src/main/java/com/netflix/priam/backupv2/BackupVerificationTask.java +++ b/priam/src/main/java/com/netflix/priam/backupv2/BackupVerificationTask.java @@ -17,8 +17,6 @@ package com.netflix.priam.backupv2; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.priam.backup.*; import com.netflix.priam.config.IBackupRestoreConfig; import com.netflix.priam.config.IConfiguration; @@ -33,6 +31,8 @@ import java.time.Instant; import java.time.temporal.ChronoUnit; import java.util.List; +import javax.inject.Inject; +import javax.inject.Singleton; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/backupv2/ForgottenFilesManager.java b/priam/src/main/java/com/netflix/priam/backupv2/ForgottenFilesManager.java index d1ea10760..1aa75b5c0 100644 --- a/priam/src/main/java/com/netflix/priam/backupv2/ForgottenFilesManager.java +++ b/priam/src/main/java/com/netflix/priam/backupv2/ForgottenFilesManager.java @@ -17,7 +17,6 @@ package com.netflix.priam.backupv2; -import com.google.inject.Inject; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.merics.BackupMetrics; import com.netflix.priam.utils.DateUtil; @@ -32,6 +31,7 @@ import java.util.Collection; import java.util.regex.Pattern; import java.util.stream.Collectors; +import javax.inject.Inject; import org.apache.commons.io.FileUtils; import org.apache.commons.io.filefilter.FileFilterUtils; import org.apache.commons.io.filefilter.IOFileFilter; diff --git a/priam/src/main/java/com/netflix/priam/backupv2/MetaFileWriterBuilder.java b/priam/src/main/java/com/netflix/priam/backupv2/MetaFileWriterBuilder.java index cc7e77f2e..711419d54 100644 --- a/priam/src/main/java/com/netflix/priam/backupv2/MetaFileWriterBuilder.java +++ b/priam/src/main/java/com/netflix/priam/backupv2/MetaFileWriterBuilder.java @@ -20,7 +20,6 @@ import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.ImmutableSet; import com.google.gson.stream.JsonWriter; -import com.google.inject.Provider; import com.netflix.priam.backup.AbstractBackupPath; import com.netflix.priam.backup.IBackupFileSystem; import com.netflix.priam.backup.IFileSystemContext; @@ -36,6 +35,7 @@ import java.util.stream.Collectors; import javax.inject.Inject; import javax.inject.Named; +import javax.inject.Provider; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/backupv2/MetaV1Proxy.java b/priam/src/main/java/com/netflix/priam/backupv2/MetaV1Proxy.java index 3569b7345..348311918 100644 --- a/priam/src/main/java/com/netflix/priam/backupv2/MetaV1Proxy.java +++ b/priam/src/main/java/com/netflix/priam/backupv2/MetaV1Proxy.java @@ -18,7 +18,6 @@ package com.netflix.priam.backupv2; import com.google.common.collect.Lists; -import com.google.inject.Inject; import com.netflix.priam.backup.*; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.utils.DateUtil; @@ -28,6 +27,7 @@ import java.nio.file.Paths; import java.time.temporal.ChronoUnit; import java.util.*; +import javax.inject.Inject; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.iterators.FilterIterator; import org.apache.commons.io.FileUtils; diff --git a/priam/src/main/java/com/netflix/priam/backupv2/MetaV2Proxy.java b/priam/src/main/java/com/netflix/priam/backupv2/MetaV2Proxy.java index 1cfa44c73..1a810f476 100644 --- a/priam/src/main/java/com/netflix/priam/backupv2/MetaV2Proxy.java +++ b/priam/src/main/java/com/netflix/priam/backupv2/MetaV2Proxy.java @@ -17,7 +17,6 @@ package com.netflix.priam.backupv2; -import com.google.inject.Provider; import com.netflix.priam.backup.*; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.utils.DateUtil; @@ -28,6 +27,7 @@ import java.nio.file.Paths; import java.util.*; import javax.inject.Inject; +import javax.inject.Provider; import org.apache.commons.collections4.iterators.FilterIterator; import org.apache.commons.collections4.iterators.TransformIterator; import org.apache.commons.io.FileUtils; diff --git a/priam/src/main/java/com/netflix/priam/config/PriamConfiguration.java b/priam/src/main/java/com/netflix/priam/config/PriamConfiguration.java index a7193655e..d52784f6c 100644 --- a/priam/src/main/java/com/netflix/priam/config/PriamConfiguration.java +++ b/priam/src/main/java/com/netflix/priam/config/PriamConfiguration.java @@ -17,8 +17,6 @@ package com.netflix.priam.config; import com.fasterxml.jackson.annotation.JsonIgnore; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.priam.configSource.IConfigSource; import com.netflix.priam.identity.config.InstanceInfo; import com.netflix.priam.scheduler.UnsupportedTypeException; @@ -27,6 +25,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.inject.Inject; +import javax.inject.Singleton; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/connection/JMXNodeTool.java b/priam/src/main/java/com/netflix/priam/connection/JMXNodeTool.java index 0be900d83..381017bff 100644 --- a/priam/src/main/java/com/netflix/priam/connection/JMXNodeTool.java +++ b/priam/src/main/java/com/netflix/priam/connection/JMXNodeTool.java @@ -16,8 +16,6 @@ */ package com.netflix.priam.connection; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.health.CassandraMonitor; import com.netflix.priam.utils.BoundedExponentialRetryCallable; @@ -32,6 +30,8 @@ import java.util.*; import java.util.Map.Entry; import java.util.concurrent.ExecutionException; +import javax.inject.Inject; +import javax.inject.Singleton; import javax.management.JMX; import javax.management.MBeanServerConnection; import javax.management.MalformedObjectNameException; diff --git a/priam/src/main/java/com/netflix/priam/cryptography/pgp/PgpCredential.java b/priam/src/main/java/com/netflix/priam/cryptography/pgp/PgpCredential.java index cc5675ec5..dcaa9af5a 100755 --- a/priam/src/main/java/com/netflix/priam/cryptography/pgp/PgpCredential.java +++ b/priam/src/main/java/com/netflix/priam/cryptography/pgp/PgpCredential.java @@ -14,9 +14,9 @@ package com.netflix.priam.cryptography.pgp; import com.amazonaws.auth.AWSCredentialsProvider; -import com.google.inject.Inject; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.cred.ICredentialGeneric; +import javax.inject.Inject; /* * A generic implementation of fetch keys as plaintext. The key values are used within PGP cryptography algorithm. Users may diff --git a/priam/src/main/java/com/netflix/priam/cryptography/pgp/PgpCryptography.java b/priam/src/main/java/com/netflix/priam/cryptography/pgp/PgpCryptography.java index 4f1289aed..a0d19aea2 100755 --- a/priam/src/main/java/com/netflix/priam/cryptography/pgp/PgpCryptography.java +++ b/priam/src/main/java/com/netflix/priam/cryptography/pgp/PgpCryptography.java @@ -13,7 +13,6 @@ */ package com.netflix.priam.cryptography.pgp; -import com.google.inject.Inject; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.cryptography.IFileCryptography; import java.io.*; @@ -22,6 +21,7 @@ import java.security.Security; import java.util.Date; import java.util.Iterator; +import javax.inject.Inject; import org.apache.commons.io.IOUtils; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.bouncycastle.openpgp.*; diff --git a/priam/src/main/java/com/netflix/priam/defaultimpl/CassandraProcessManager.java b/priam/src/main/java/com/netflix/priam/defaultimpl/CassandraProcessManager.java index 3ef8d06a6..f3910ce14 100644 --- a/priam/src/main/java/com/netflix/priam/defaultimpl/CassandraProcessManager.java +++ b/priam/src/main/java/com/netflix/priam/defaultimpl/CassandraProcessManager.java @@ -14,7 +14,6 @@ package com.netflix.priam.defaultimpl; import com.google.common.collect.Lists; -import com.google.inject.Inject; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.connection.JMXNodeTool; import com.netflix.priam.health.InstanceState; @@ -27,6 +26,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.*; +import javax.inject.Inject; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/google/GcsCredential.java b/priam/src/main/java/com/netflix/priam/google/GcsCredential.java index 21cfa4023..f8447c3bb 100755 --- a/priam/src/main/java/com/netflix/priam/google/GcsCredential.java +++ b/priam/src/main/java/com/netflix/priam/google/GcsCredential.java @@ -14,9 +14,9 @@ package com.netflix.priam.google; import com.amazonaws.auth.AWSCredentialsProvider; -import com.google.inject.Inject; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.cred.ICredentialGeneric; +import javax.inject.Inject; /* * A generic implementation of fetch keys as plaintext. The key values are used with Google Cloud Storage. Users may diff --git a/priam/src/main/java/com/netflix/priam/google/GoogleEncryptedFileSystem.java b/priam/src/main/java/com/netflix/priam/google/GoogleEncryptedFileSystem.java index f008e5726..edb42ca4f 100755 --- a/priam/src/main/java/com/netflix/priam/google/GoogleEncryptedFileSystem.java +++ b/priam/src/main/java/com/netflix/priam/google/GoogleEncryptedFileSystem.java @@ -21,9 +21,6 @@ import com.google.api.client.json.jackson2.JacksonFactory; import com.google.api.services.storage.Storage; import com.google.api.services.storage.StorageScopes; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.name.Named; import com.netflix.priam.backup.AbstractBackupPath; import com.netflix.priam.backup.AbstractFileSystem; import com.netflix.priam.backup.BackupRestoreException; @@ -39,6 +36,9 @@ import java.util.Collection; import java.util.Iterator; import java.util.List; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Provider; import org.apache.commons.io.IOUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/health/CassandraMonitor.java b/priam/src/main/java/com/netflix/priam/health/CassandraMonitor.java index f0f6c849c..1e8ef65dc 100644 --- a/priam/src/main/java/com/netflix/priam/health/CassandraMonitor.java +++ b/priam/src/main/java/com/netflix/priam/health/CassandraMonitor.java @@ -16,8 +16,6 @@ */ package com.netflix.priam.health; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.connection.JMXNodeTool; import com.netflix.priam.defaultimpl.ICassandraProcess; @@ -30,6 +28,8 @@ import java.io.IOException; import java.io.InputStreamReader; import java.util.concurrent.atomic.AtomicBoolean; +import javax.inject.Inject; +import javax.inject.Singleton; import org.apache.cassandra.tools.NodeProbe; import org.apache.commons.io.IOUtils; import org.slf4j.Logger; diff --git a/priam/src/main/java/com/netflix/priam/health/InstanceState.java b/priam/src/main/java/com/netflix/priam/health/InstanceState.java index 402f331e0..afc098828 100644 --- a/priam/src/main/java/com/netflix/priam/health/InstanceState.java +++ b/priam/src/main/java/com/netflix/priam/health/InstanceState.java @@ -16,14 +16,14 @@ */ package com.netflix.priam.health; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.priam.backup.BackupMetadata; import com.netflix.priam.backup.Status; import com.netflix.priam.utils.GsonJsonSerializer; import java.time.LocalDateTime; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; +import javax.inject.Inject; +import javax.inject.Singleton; /** * Contains the state of the health of processed managed by Priam, and maintains the isHealthy flag diff --git a/priam/src/main/java/com/netflix/priam/health/ThriftChecker.java b/priam/src/main/java/com/netflix/priam/health/ThriftChecker.java index 0390cbbca..cddc6b522 100644 --- a/priam/src/main/java/com/netflix/priam/health/ThriftChecker.java +++ b/priam/src/main/java/com/netflix/priam/health/ThriftChecker.java @@ -1,10 +1,10 @@ package com.netflix.priam.health; -import com.google.inject.Inject; import com.netflix.priam.config.IConfiguration; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.concurrent.TimeUnit; +import javax.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/identity/DoubleRing.java b/priam/src/main/java/com/netflix/priam/identity/DoubleRing.java index 910b0f0d6..6bd4a943a 100644 --- a/priam/src/main/java/com/netflix/priam/identity/DoubleRing.java +++ b/priam/src/main/java/com/netflix/priam/identity/DoubleRing.java @@ -16,13 +16,13 @@ */ package com.netflix.priam.identity; -import com.google.inject.Inject; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.identity.config.InstanceInfo; import com.netflix.priam.utils.ITokenManager; import java.io.*; import java.util.Set; import java.util.stream.Collectors; +import javax.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/identity/InstanceIdentity.java b/priam/src/main/java/com/netflix/priam/identity/InstanceIdentity.java index 458420e91..a73865673 100644 --- a/priam/src/main/java/com/netflix/priam/identity/InstanceIdentity.java +++ b/priam/src/main/java/com/netflix/priam/identity/InstanceIdentity.java @@ -21,14 +21,14 @@ import com.google.common.collect.ListMultimap; import com.google.common.collect.Lists; import com.google.common.collect.Multimaps; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.identity.config.InstanceInfo; import com.netflix.priam.identity.token.ITokenRetriever; import java.util.HashMap; import java.util.LinkedList; import java.util.List; +import javax.inject.Inject; +import javax.inject.Singleton; /** * This class provides the central place to create and consume the identity of the instance - token, diff --git a/priam/src/main/java/com/netflix/priam/identity/config/AWSInstanceInfo.java b/priam/src/main/java/com/netflix/priam/identity/config/AWSInstanceInfo.java index 0a74522da..542496a56 100644 --- a/priam/src/main/java/com/netflix/priam/identity/config/AWSInstanceInfo.java +++ b/priam/src/main/java/com/netflix/priam/identity/config/AWSInstanceInfo.java @@ -19,11 +19,11 @@ import com.amazonaws.util.EC2MetadataUtils; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.priam.cred.ICredential; import com.netflix.priam.utils.RetryableCallable; import java.util.List; +import javax.inject.Inject; +import javax.inject.Singleton; import org.apache.commons.lang3.StringUtils; import org.codehaus.jettison.json.JSONObject; import org.slf4j.Logger; diff --git a/priam/src/main/java/com/netflix/priam/merics/BackupMetrics.java b/priam/src/main/java/com/netflix/priam/merics/BackupMetrics.java index e9b5654a3..beba3459f 100644 --- a/priam/src/main/java/com/netflix/priam/merics/BackupMetrics.java +++ b/priam/src/main/java/com/netflix/priam/merics/BackupMetrics.java @@ -13,11 +13,11 @@ */ package com.netflix.priam.merics; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.spectator.api.Counter; import com.netflix.spectator.api.DistributionSummary; import com.netflix.spectator.api.Registry; +import javax.inject.Inject; +import javax.inject.Singleton; /** Created by vinhn on 2/13/17. */ @Singleton diff --git a/priam/src/main/java/com/netflix/priam/merics/CassMonitorMetrics.java b/priam/src/main/java/com/netflix/priam/merics/CassMonitorMetrics.java index 919789689..77fbc6c09 100644 --- a/priam/src/main/java/com/netflix/priam/merics/CassMonitorMetrics.java +++ b/priam/src/main/java/com/netflix/priam/merics/CassMonitorMetrics.java @@ -13,12 +13,12 @@ */ package com.netflix.priam.merics; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.spectator.api.Gauge; import com.netflix.spectator.api.Registry; import com.netflix.spectator.api.patterns.PolledMeter; import java.util.concurrent.atomic.AtomicLong; +import javax.inject.Inject; +import javax.inject.Singleton; /** @author vchella */ @Singleton diff --git a/priam/src/main/java/com/netflix/priam/notification/AWSSnsNotificationService.java b/priam/src/main/java/com/netflix/priam/notification/AWSSnsNotificationService.java index 61bcd91f3..564647ff5 100644 --- a/priam/src/main/java/com/netflix/priam/notification/AWSSnsNotificationService.java +++ b/priam/src/main/java/com/netflix/priam/notification/AWSSnsNotificationService.java @@ -21,14 +21,14 @@ import com.amazonaws.services.sns.model.MessageAttributeValue; import com.amazonaws.services.sns.model.PublishRequest; import com.amazonaws.services.sns.model.PublishResult; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.priam.aws.IAMCredential; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.identity.config.InstanceInfo; import com.netflix.priam.merics.BackupMetrics; import com.netflix.priam.utils.BoundedExponentialRetryCallable; import java.util.Map; +import javax.inject.Inject; +import javax.inject.Singleton; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/notification/BackupNotificationMgr.java b/priam/src/main/java/com/netflix/priam/notification/BackupNotificationMgr.java index 5a19ca457..ef6beda17 100644 --- a/priam/src/main/java/com/netflix/priam/notification/BackupNotificationMgr.java +++ b/priam/src/main/java/com/netflix/priam/notification/BackupNotificationMgr.java @@ -14,7 +14,6 @@ package com.netflix.priam.notification; import com.amazonaws.services.sns.model.MessageAttributeValue; -import com.google.inject.Inject; import com.netflix.priam.backup.AbstractBackupPath; import com.netflix.priam.backup.BackupRestoreException; import com.netflix.priam.backup.BackupVerificationResult; @@ -23,6 +22,7 @@ import com.netflix.priam.identity.InstanceIdentity; import com.netflix.priam.identity.config.InstanceInfo; import java.util.*; +import javax.inject.Inject; import org.apache.commons.lang3.StringUtils; import org.codehaus.jettison.json.JSONException; import org.codehaus.jettison.json.JSONObject; diff --git a/priam/src/main/java/com/netflix/priam/resources/BackupServlet.java b/priam/src/main/java/com/netflix/priam/resources/BackupServlet.java index 31c9efdcc..ef90e769c 100644 --- a/priam/src/main/java/com/netflix/priam/resources/BackupServlet.java +++ b/priam/src/main/java/com/netflix/priam/resources/BackupServlet.java @@ -16,11 +16,8 @@ */ package com.netflix.priam.resources; -import com.google.inject.Inject; -import com.google.inject.name.Named; import com.netflix.priam.backup.*; import com.netflix.priam.backup.AbstractBackupPath.BackupFileType; -import com.netflix.priam.backup.BackupVersion; import com.netflix.priam.config.IBackupRestoreConfig; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.scheduler.PriamScheduler; @@ -30,6 +27,8 @@ import java.time.temporal.ChronoUnit; import java.util.*; import java.util.stream.Collectors; +import javax.inject.Inject; +import javax.inject.Named; import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; diff --git a/priam/src/main/java/com/netflix/priam/resources/BackupServletV2.java b/priam/src/main/java/com/netflix/priam/resources/BackupServletV2.java index 681306468..11cc1a39e 100644 --- a/priam/src/main/java/com/netflix/priam/resources/BackupServletV2.java +++ b/priam/src/main/java/com/netflix/priam/resources/BackupServletV2.java @@ -17,8 +17,6 @@ package com.netflix.priam.resources; -import com.google.inject.Inject; -import com.google.inject.Provider; import com.netflix.priam.backup.*; import com.netflix.priam.backupv2.BackupTTLTask; import com.netflix.priam.backupv2.BackupV2Service; @@ -33,13 +31,10 @@ import java.util.List; import java.util.Optional; import java.util.stream.Collectors; +import javax.inject.Inject; import javax.inject.Named; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; +import javax.inject.Provider; +import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.slf4j.Logger; diff --git a/priam/src/main/java/com/netflix/priam/resources/CassandraAdmin.java b/priam/src/main/java/com/netflix/priam/resources/CassandraAdmin.java index a9f2b895c..b2e0b0213 100644 --- a/priam/src/main/java/com/netflix/priam/resources/CassandraAdmin.java +++ b/priam/src/main/java/com/netflix/priam/resources/CassandraAdmin.java @@ -17,7 +17,6 @@ package com.netflix.priam.resources; import com.google.common.collect.Lists; -import com.google.inject.Inject; import com.netflix.priam.cluster.management.Compaction; import com.netflix.priam.cluster.management.Flush; import com.netflix.priam.compress.SnappyCompression; @@ -32,6 +31,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ExecutionException; +import javax.inject.Inject; import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; diff --git a/priam/src/main/java/com/netflix/priam/resources/CassandraConfig.java b/priam/src/main/java/com/netflix/priam/resources/CassandraConfig.java index aacb0fe21..19cf9b2a5 100644 --- a/priam/src/main/java/com/netflix/priam/resources/CassandraConfig.java +++ b/priam/src/main/java/com/netflix/priam/resources/CassandraConfig.java @@ -16,7 +16,6 @@ */ package com.netflix.priam.resources; -import com.google.inject.Inject; import com.netflix.priam.PriamServer; import com.netflix.priam.identity.DoubleRing; import com.netflix.priam.merics.CassMonitorMetrics; @@ -24,11 +23,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; +import javax.inject.Inject; +import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; diff --git a/priam/src/main/java/com/netflix/priam/resources/PriamConfig.java b/priam/src/main/java/com/netflix/priam/resources/PriamConfig.java index f6118b71f..490ded651 100644 --- a/priam/src/main/java/com/netflix/priam/resources/PriamConfig.java +++ b/priam/src/main/java/com/netflix/priam/resources/PriamConfig.java @@ -16,16 +16,12 @@ */ package com.netflix.priam.resources; -import com.google.inject.Inject; import com.netflix.priam.PriamServer; import com.netflix.priam.utils.GsonJsonSerializer; import java.util.HashMap; import java.util.Map; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; +import javax.inject.Inject; +import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.slf4j.Logger; diff --git a/priam/src/main/java/com/netflix/priam/resources/PriamInstanceResource.java b/priam/src/main/java/com/netflix/priam/resources/PriamInstanceResource.java index 7c8eefc23..de0eed1fa 100644 --- a/priam/src/main/java/com/netflix/priam/resources/PriamInstanceResource.java +++ b/priam/src/main/java/com/netflix/priam/resources/PriamInstanceResource.java @@ -16,13 +16,13 @@ */ package com.netflix.priam.resources; -import com.google.inject.Inject; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.identity.IPriamInstanceFactory; import com.netflix.priam.identity.PriamInstance; import com.netflix.priam.identity.config.InstanceInfo; import java.net.URI; import java.util.stream.Collectors; +import javax.inject.Inject; import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; diff --git a/priam/src/main/java/com/netflix/priam/resources/RestoreServlet.java b/priam/src/main/java/com/netflix/priam/resources/RestoreServlet.java index 9451eb33e..34378a890 100644 --- a/priam/src/main/java/com/netflix/priam/resources/RestoreServlet.java +++ b/priam/src/main/java/com/netflix/priam/resources/RestoreServlet.java @@ -13,10 +13,10 @@ */ package com.netflix.priam.resources; -import com.google.inject.Inject; import com.netflix.priam.health.InstanceState; import com.netflix.priam.restore.Restore; import com.netflix.priam.utils.DateUtil; +import javax.inject.Inject; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; diff --git a/priam/src/main/java/com/netflix/priam/resources/SecurityGroupAdmin.java b/priam/src/main/java/com/netflix/priam/resources/SecurityGroupAdmin.java index 6b1f10a7b..f1a54c198 100644 --- a/priam/src/main/java/com/netflix/priam/resources/SecurityGroupAdmin.java +++ b/priam/src/main/java/com/netflix/priam/resources/SecurityGroupAdmin.java @@ -13,9 +13,9 @@ */ package com.netflix.priam.resources; -import com.google.inject.Inject; import com.netflix.priam.identity.IMembership; import java.util.Collections; +import javax.inject.Inject; import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; diff --git a/priam/src/main/java/com/netflix/priam/restore/AbstractRestore.java b/priam/src/main/java/com/netflix/priam/restore/AbstractRestore.java index 6b8c865c6..60f69d14b 100644 --- a/priam/src/main/java/com/netflix/priam/restore/AbstractRestore.java +++ b/priam/src/main/java/com/netflix/priam/restore/AbstractRestore.java @@ -16,8 +16,6 @@ */ package com.netflix.priam.restore; -import com.google.inject.Inject; -import com.google.inject.Provider; import com.netflix.priam.backup.*; import com.netflix.priam.backup.AbstractBackupPath.BackupFileType; import com.netflix.priam.backupv2.IMetaProxy; @@ -28,7 +26,10 @@ import com.netflix.priam.identity.InstanceIdentity; import com.netflix.priam.identity.config.InstanceInfo; import com.netflix.priam.scheduler.Task; -import com.netflix.priam.utils.*; +import com.netflix.priam.utils.DateUtil; +import com.netflix.priam.utils.RetryableCallable; +import com.netflix.priam.utils.Sleeper; +import com.netflix.priam.utils.SystemUtils; import java.io.File; import java.io.IOException; import java.math.BigInteger; @@ -37,7 +38,9 @@ import java.time.ZoneId; import java.util.*; import java.util.concurrent.Future; +import javax.inject.Inject; import javax.inject.Named; +import javax.inject.Provider; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringUtils; diff --git a/priam/src/main/java/com/netflix/priam/restore/AwsCrossAccountCryptographyRestoreStrategy.java b/priam/src/main/java/com/netflix/priam/restore/AwsCrossAccountCryptographyRestoreStrategy.java index 010648b78..565fe764d 100755 --- a/priam/src/main/java/com/netflix/priam/restore/AwsCrossAccountCryptographyRestoreStrategy.java +++ b/priam/src/main/java/com/netflix/priam/restore/AwsCrossAccountCryptographyRestoreStrategy.java @@ -13,10 +13,6 @@ */ package com.netflix.priam.restore; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.inject.name.Named; import com.netflix.priam.aws.S3CrossAccountFileSystem; import com.netflix.priam.backup.AbstractBackupPath; import com.netflix.priam.backup.MetaData; @@ -30,6 +26,10 @@ import com.netflix.priam.scheduler.SimpleTimer; import com.netflix.priam.scheduler.TaskTimer; import com.netflix.priam.utils.Sleeper; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Provider; +import javax.inject.Singleton; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/restore/EncryptedRestoreBase.java b/priam/src/main/java/com/netflix/priam/restore/EncryptedRestoreBase.java index 2e69d5870..59842d456 100755 --- a/priam/src/main/java/com/netflix/priam/restore/EncryptedRestoreBase.java +++ b/priam/src/main/java/com/netflix/priam/restore/EncryptedRestoreBase.java @@ -13,7 +13,6 @@ */ package com.netflix.priam.restore; -import com.google.inject.Provider; import com.netflix.priam.backup.AbstractBackupPath; import com.netflix.priam.backup.IBackupFileSystem; import com.netflix.priam.backup.MetaData; @@ -34,6 +33,7 @@ import java.nio.file.Paths; import java.util.concurrent.Future; import java.util.concurrent.ThreadPoolExecutor; +import javax.inject.Provider; import org.bouncycastle.util.io.Streams; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/restore/EncryptedRestoreStrategy.java b/priam/src/main/java/com/netflix/priam/restore/EncryptedRestoreStrategy.java index fdef4f4ad..48197758c 100755 --- a/priam/src/main/java/com/netflix/priam/restore/EncryptedRestoreStrategy.java +++ b/priam/src/main/java/com/netflix/priam/restore/EncryptedRestoreStrategy.java @@ -13,10 +13,6 @@ */ package com.netflix.priam.restore; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.inject.name.Named; import com.netflix.priam.backup.AbstractBackupPath; import com.netflix.priam.backup.IBackupFileSystem; import com.netflix.priam.backup.MetaData; @@ -30,6 +26,10 @@ import com.netflix.priam.scheduler.SimpleTimer; import com.netflix.priam.scheduler.TaskTimer; import com.netflix.priam.utils.Sleeper; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Provider; +import javax.inject.Singleton; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/restore/GoogleCryptographyRestoreStrategy.java b/priam/src/main/java/com/netflix/priam/restore/GoogleCryptographyRestoreStrategy.java index 1c0fc9d79..c735d254e 100755 --- a/priam/src/main/java/com/netflix/priam/restore/GoogleCryptographyRestoreStrategy.java +++ b/priam/src/main/java/com/netflix/priam/restore/GoogleCryptographyRestoreStrategy.java @@ -13,10 +13,6 @@ */ package com.netflix.priam.restore; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.inject.name.Named; import com.netflix.priam.backup.AbstractBackupPath; import com.netflix.priam.backup.IBackupFileSystem; import com.netflix.priam.backup.MetaData; @@ -30,6 +26,10 @@ import com.netflix.priam.scheduler.SimpleTimer; import com.netflix.priam.scheduler.TaskTimer; import com.netflix.priam.utils.Sleeper; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Provider; +import javax.inject.Singleton; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/restore/Restore.java b/priam/src/main/java/com/netflix/priam/restore/Restore.java index c5cd04388..6e7e7b906 100644 --- a/priam/src/main/java/com/netflix/priam/restore/Restore.java +++ b/priam/src/main/java/com/netflix/priam/restore/Restore.java @@ -16,10 +16,6 @@ */ package com.netflix.priam.restore; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; -import com.google.inject.name.Named; import com.netflix.priam.backup.AbstractBackupPath; import com.netflix.priam.backup.IBackupFileSystem; import com.netflix.priam.backup.MetaData; @@ -32,6 +28,10 @@ import com.netflix.priam.utils.Sleeper; import java.nio.file.Path; import java.util.concurrent.Future; +import javax.inject.Inject; +import javax.inject.Named; +import javax.inject.Provider; +import javax.inject.Singleton; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/restore/RestoreContext.java b/priam/src/main/java/com/netflix/priam/restore/RestoreContext.java index ba54a819d..2252acfc9 100755 --- a/priam/src/main/java/com/netflix/priam/restore/RestoreContext.java +++ b/priam/src/main/java/com/netflix/priam/restore/RestoreContext.java @@ -13,10 +13,10 @@ */ package com.netflix.priam.restore; -import com.google.inject.Inject; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.scheduler.PriamScheduler; import com.netflix.priam.scheduler.UnsupportedTypeException; +import javax.inject.Inject; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/restore/RestoreTokenSelector.java b/priam/src/main/java/com/netflix/priam/restore/RestoreTokenSelector.java index 7f0563cf8..016dcfd07 100644 --- a/priam/src/main/java/com/netflix/priam/restore/RestoreTokenSelector.java +++ b/priam/src/main/java/com/netflix/priam/restore/RestoreTokenSelector.java @@ -16,8 +16,6 @@ */ package com.netflix.priam.restore; -import com.google.inject.Inject; -import com.google.inject.name.Named; import com.netflix.priam.backup.AbstractBackupPath; import com.netflix.priam.backup.IBackupFileSystem; import com.netflix.priam.utils.ITokenManager; @@ -26,6 +24,8 @@ import java.util.Date; import java.util.Iterator; import java.util.List; +import javax.inject.Inject; +import javax.inject.Named; /** Runs algorithms as finding closest token from a list of token (in a backup) */ public class RestoreTokenSelector { diff --git a/priam/src/main/java/com/netflix/priam/scheduler/GuiceJobFactory.java b/priam/src/main/java/com/netflix/priam/scheduler/GuiceJobFactory.java index 432e5ae6e..06041b308 100644 --- a/priam/src/main/java/com/netflix/priam/scheduler/GuiceJobFactory.java +++ b/priam/src/main/java/com/netflix/priam/scheduler/GuiceJobFactory.java @@ -16,8 +16,8 @@ */ package com.netflix.priam.scheduler; -import com.google.inject.Inject; import com.google.inject.Injector; +import javax.inject.Inject; import org.quartz.Job; import org.quartz.JobDetail; import org.quartz.Scheduler; diff --git a/priam/src/main/java/com/netflix/priam/scheduler/PriamScheduler.java b/priam/src/main/java/com/netflix/priam/scheduler/PriamScheduler.java index 20fe13082..573f3a2fc 100644 --- a/priam/src/main/java/com/netflix/priam/scheduler/PriamScheduler.java +++ b/priam/src/main/java/com/netflix/priam/scheduler/PriamScheduler.java @@ -16,10 +16,10 @@ */ package com.netflix.priam.scheduler; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.priam.utils.Sleeper; import java.text.ParseException; +import javax.inject.Inject; +import javax.inject.Singleton; import org.quartz.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/tuner/JVMOptionsTuner.java b/priam/src/main/java/com/netflix/priam/tuner/JVMOptionsTuner.java index 9f771ad57..9115e4b7e 100644 --- a/priam/src/main/java/com/netflix/priam/tuner/JVMOptionsTuner.java +++ b/priam/src/main/java/com/netflix/priam/tuner/JVMOptionsTuner.java @@ -17,12 +17,12 @@ package com.netflix.priam.tuner; -import com.google.inject.Inject; import com.netflix.priam.config.IConfiguration; import java.io.File; import java.nio.file.Files; import java.util.*; import java.util.stream.Collectors; +import javax.inject.Inject; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/tuner/PropertiesFileTuner.java b/priam/src/main/java/com/netflix/priam/tuner/PropertiesFileTuner.java index 818816707..a81f8125c 100644 --- a/priam/src/main/java/com/netflix/priam/tuner/PropertiesFileTuner.java +++ b/priam/src/main/java/com/netflix/priam/tuner/PropertiesFileTuner.java @@ -2,12 +2,12 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Splitter; -import com.google.inject.Inject; import com.netflix.priam.config.IConfiguration; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.util.Map; +import javax.inject.Inject; import org.apache.commons.configuration2.PropertiesConfiguration; import org.apache.commons.configuration2.ex.ConfigurationException; import org.apache.commons.io.FilenameUtils; diff --git a/priam/src/main/java/com/netflix/priam/tuner/StandardTuner.java b/priam/src/main/java/com/netflix/priam/tuner/StandardTuner.java index 4b511a672..2e11c4635 100644 --- a/priam/src/main/java/com/netflix/priam/tuner/StandardTuner.java +++ b/priam/src/main/java/com/netflix/priam/tuner/StandardTuner.java @@ -14,7 +14,6 @@ package com.netflix.priam.tuner; import com.google.common.collect.Lists; -import com.google.inject.Inject; import com.netflix.priam.backup.IncrementalBackup; import com.netflix.priam.config.IBackupRestoreConfig; import com.netflix.priam.config.IConfiguration; @@ -25,6 +24,7 @@ import java.util.List; import java.util.Map; import java.util.Properties; +import javax.inject.Inject; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/tuner/TuneCassandra.java b/priam/src/main/java/com/netflix/priam/tuner/TuneCassandra.java index eacbd6a4f..996bd4bcb 100644 --- a/priam/src/main/java/com/netflix/priam/tuner/TuneCassandra.java +++ b/priam/src/main/java/com/netflix/priam/tuner/TuneCassandra.java @@ -15,14 +15,14 @@ */ package com.netflix.priam.tuner; -import com.google.inject.Inject; -import com.google.inject.Singleton; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.health.InstanceState; import com.netflix.priam.scheduler.SimpleTimer; import com.netflix.priam.scheduler.Task; import com.netflix.priam.scheduler.TaskTimer; import java.io.IOException; +import javax.inject.Inject; +import javax.inject.Singleton; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/tuner/dse/AuditLogTunerLog4J.java b/priam/src/main/java/com/netflix/priam/tuner/dse/AuditLogTunerLog4J.java index 1d0e820b1..4f17bf536 100644 --- a/priam/src/main/java/com/netflix/priam/tuner/dse/AuditLogTunerLog4J.java +++ b/priam/src/main/java/com/netflix/priam/tuner/dse/AuditLogTunerLog4J.java @@ -19,12 +19,12 @@ import com.google.common.base.Joiner; import com.google.common.io.Files; -import com.google.inject.Inject; import com.netflix.priam.config.IConfiguration; import java.io.BufferedWriter; import java.io.File; import java.nio.charset.Charset; import java.util.List; +import javax.inject.Inject; import org.apache.cassandra.io.util.FileUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/tuner/dse/AuditLogTunerYaml.java b/priam/src/main/java/com/netflix/priam/tuner/dse/AuditLogTunerYaml.java index efb2b1b71..727d307c8 100644 --- a/priam/src/main/java/com/netflix/priam/tuner/dse/AuditLogTunerYaml.java +++ b/priam/src/main/java/com/netflix/priam/tuner/dse/AuditLogTunerYaml.java @@ -17,12 +17,12 @@ package com.netflix.priam.tuner.dse; -import com.google.inject.Inject; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; import java.util.Map; +import javax.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.yaml.snakeyaml.DumperOptions; diff --git a/priam/src/main/java/com/netflix/priam/tuner/dse/DseProcessManager.java b/priam/src/main/java/com/netflix/priam/tuner/dse/DseProcessManager.java index 9560a3925..17fc2e2b9 100644 --- a/priam/src/main/java/com/netflix/priam/tuner/dse/DseProcessManager.java +++ b/priam/src/main/java/com/netflix/priam/tuner/dse/DseProcessManager.java @@ -13,13 +13,13 @@ */ package com.netflix.priam.tuner.dse; -import com.google.inject.Inject; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.defaultimpl.CassandraProcessManager; import com.netflix.priam.health.InstanceState; import com.netflix.priam.merics.CassMonitorMetrics; import com.netflix.priam.tuner.dse.IDseConfiguration.NodeType; import java.util.Map; +import javax.inject.Inject; public class DseProcessManager extends CassandraProcessManager { private final IDseConfiguration dseConfig; diff --git a/priam/src/main/java/com/netflix/priam/tuner/dse/DseTuner.java b/priam/src/main/java/com/netflix/priam/tuner/dse/DseTuner.java index 047d06052..4b7216930 100644 --- a/priam/src/main/java/com/netflix/priam/tuner/dse/DseTuner.java +++ b/priam/src/main/java/com/netflix/priam/tuner/dse/DseTuner.java @@ -16,7 +16,6 @@ import static com.netflix.priam.tuner.dse.IDseConfiguration.NodeType; import static org.apache.cassandra.locator.SnitchProperties.RACKDC_PROPERTY_FILENAME; -import com.google.inject.Inject; import com.netflix.priam.config.IBackupRestoreConfig; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.identity.config.InstanceInfo; @@ -25,6 +24,7 @@ import java.io.FileWriter; import java.io.Reader; import java.util.Properties; +import javax.inject.Inject; import org.apache.cassandra.io.util.FileUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/priam/src/main/java/com/netflix/priam/utils/TokenManager.java b/priam/src/main/java/com/netflix/priam/utils/TokenManager.java index d9276a4da..61bb0529d 100644 --- a/priam/src/main/java/com/netflix/priam/utils/TokenManager.java +++ b/priam/src/main/java/com/netflix/priam/utils/TokenManager.java @@ -19,11 +19,11 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; import com.google.common.collect.Ordering; -import com.google.inject.Inject; import com.netflix.priam.config.IConfiguration; import java.math.BigInteger; import java.util.Collections; import java.util.List; +import javax.inject.Inject; public class TokenManager implements ITokenManager { public static final BigInteger MINIMUM_TOKEN_RANDOM = BigInteger.ZERO; diff --git a/priam/src/test/java/com/netflix/priam/aws/TestRemoteBackupPath.java b/priam/src/test/java/com/netflix/priam/aws/TestRemoteBackupPath.java index 72ede456e..bc75b66a2 100644 --- a/priam/src/test/java/com/netflix/priam/aws/TestRemoteBackupPath.java +++ b/priam/src/test/java/com/netflix/priam/aws/TestRemoteBackupPath.java @@ -18,7 +18,6 @@ package com.netflix.priam.aws; import com.google.inject.Guice; -import com.google.inject.Provider; import com.netflix.priam.backup.AbstractBackupPath; import com.netflix.priam.backup.AbstractBackupPath.BackupFileType; import com.netflix.priam.backup.BRTestModule; @@ -27,6 +26,7 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.time.Instant; +import javax.inject.Provider; import org.junit.Assert; import org.junit.Test; import org.junit.jupiter.api.Assertions; diff --git a/priam/src/test/java/com/netflix/priam/backup/FakeBackupFileSystem.java b/priam/src/test/java/com/netflix/priam/backup/FakeBackupFileSystem.java index 8807e4b4d..0750179fd 100644 --- a/priam/src/test/java/com/netflix/priam/backup/FakeBackupFileSystem.java +++ b/priam/src/test/java/com/netflix/priam/backup/FakeBackupFileSystem.java @@ -17,9 +17,6 @@ package com.netflix.priam.backup; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; import com.netflix.priam.aws.RemoteBackupPath; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.merics.BackupMetrics; @@ -30,6 +27,9 @@ import java.nio.file.Path; import java.time.Instant; import java.util.*; +import javax.inject.Inject; +import javax.inject.Provider; +import javax.inject.Singleton; import org.json.simple.JSONArray; @Singleton diff --git a/priam/src/test/java/com/netflix/priam/backup/NullBackupFileSystem.java b/priam/src/test/java/com/netflix/priam/backup/NullBackupFileSystem.java index 6dbf3941f..d193f0daf 100644 --- a/priam/src/test/java/com/netflix/priam/backup/NullBackupFileSystem.java +++ b/priam/src/test/java/com/netflix/priam/backup/NullBackupFileSystem.java @@ -17,8 +17,6 @@ package com.netflix.priam.backup; -import com.google.inject.Inject; -import com.google.inject.Provider; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.merics.BackupMetrics; import com.netflix.priam.notification.BackupNotificationMgr; @@ -27,6 +25,8 @@ import java.util.Collections; import java.util.Iterator; import java.util.List; +import javax.inject.Inject; +import javax.inject.Provider; public class NullBackupFileSystem extends AbstractFileSystem { diff --git a/priam/src/test/java/com/netflix/priam/backup/TestAbstractFileSystem.java b/priam/src/test/java/com/netflix/priam/backup/TestAbstractFileSystem.java index 449a4a282..bd666f1d2 100644 --- a/priam/src/test/java/com/netflix/priam/backup/TestAbstractFileSystem.java +++ b/priam/src/test/java/com/netflix/priam/backup/TestAbstractFileSystem.java @@ -18,9 +18,7 @@ package com.netflix.priam.backup; import com.google.inject.Guice; -import com.google.inject.Inject; import com.google.inject.Injector; -import com.google.inject.Provider; import com.netflix.priam.config.IConfiguration; import com.netflix.priam.merics.BackupMetrics; import com.netflix.priam.notification.BackupNotificationMgr; @@ -35,6 +33,8 @@ import java.util.List; import java.util.Random; import java.util.concurrent.*; +import javax.inject.Inject; +import javax.inject.Provider; import org.apache.commons.io.FileUtils; import org.junit.Assert; import org.junit.Before; diff --git a/priam/src/test/java/com/netflix/priam/backup/TestBackupHelperImpl.java b/priam/src/test/java/com/netflix/priam/backup/TestBackupHelperImpl.java index 224633efd..470defc86 100644 --- a/priam/src/test/java/com/netflix/priam/backup/TestBackupHelperImpl.java +++ b/priam/src/test/java/com/netflix/priam/backup/TestBackupHelperImpl.java @@ -5,7 +5,6 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.inject.Guice; import com.google.inject.Injector; -import com.google.inject.Provider; import com.netflix.priam.compress.CompressionType; import com.netflix.priam.config.BackupsToCompress; import com.netflix.priam.config.FakeConfiguration; @@ -18,6 +17,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.Objects; +import javax.inject.Provider; import org.apache.commons.io.FileUtils; import org.junit.*; import org.junit.experimental.runners.Enclosed; diff --git a/priam/src/test/java/com/netflix/priam/backupv2/TestBackupTTLTask.java b/priam/src/test/java/com/netflix/priam/backupv2/TestBackupTTLTask.java index 74577b11f..f99bbce84 100644 --- a/priam/src/test/java/com/netflix/priam/backupv2/TestBackupTTLTask.java +++ b/priam/src/test/java/com/netflix/priam/backupv2/TestBackupTTLTask.java @@ -19,7 +19,6 @@ import com.google.inject.Guice; import com.google.inject.Injector; -import com.google.inject.Provider; import com.netflix.priam.backup.AbstractBackupPath; import com.netflix.priam.backup.BRTestModule; import com.netflix.priam.backup.FakeBackupFileSystem; @@ -38,6 +37,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.inject.Provider; import mockit.Expectations; import mockit.Mocked; import org.junit.After; diff --git a/priam/src/test/java/com/netflix/priam/backupv2/TestBackupUtils.java b/priam/src/test/java/com/netflix/priam/backupv2/TestBackupUtils.java index e14253a6f..8f0d79ff8 100644 --- a/priam/src/test/java/com/netflix/priam/backupv2/TestBackupUtils.java +++ b/priam/src/test/java/com/netflix/priam/backupv2/TestBackupUtils.java @@ -19,9 +19,7 @@ import com.google.common.collect.ImmutableSetMultimap; import com.google.inject.Guice; -import com.google.inject.Inject; import com.google.inject.Injector; -import com.google.inject.Provider; import com.netflix.priam.backup.AbstractBackupPath; import com.netflix.priam.backup.BRTestModule; import com.netflix.priam.config.IConfiguration; @@ -31,6 +29,8 @@ import java.nio.file.Paths; import java.time.Instant; import java.util.List; +import javax.inject.Inject; +import javax.inject.Provider; import org.apache.commons.io.FileUtils; /** Created by aagrawal on 12/17/18. */ diff --git a/priam/src/test/java/com/netflix/priam/backupv2/TestMetaV2Proxy.java b/priam/src/test/java/com/netflix/priam/backupv2/TestMetaV2Proxy.java index 68d56d895..b0fc4294a 100644 --- a/priam/src/test/java/com/netflix/priam/backupv2/TestMetaV2Proxy.java +++ b/priam/src/test/java/com/netflix/priam/backupv2/TestMetaV2Proxy.java @@ -19,7 +19,6 @@ import com.google.inject.Guice; import com.google.inject.Injector; -import com.google.inject.Provider; import com.netflix.priam.backup.AbstractBackupPath; import com.netflix.priam.backup.BRTestModule; import com.netflix.priam.backup.BackupRestoreException; @@ -36,6 +35,7 @@ import java.util.Iterator; import java.util.List; import java.util.stream.Collectors; +import javax.inject.Provider; import org.apache.commons.io.FileUtils; import org.junit.After; import org.junit.Assert; diff --git a/priam/src/test/java/com/netflix/priam/config/FakeConfiguration.java b/priam/src/test/java/com/netflix/priam/config/FakeConfiguration.java index e839ad56a..ef4c7bc17 100644 --- a/priam/src/test/java/com/netflix/priam/config/FakeConfiguration.java +++ b/priam/src/test/java/com/netflix/priam/config/FakeConfiguration.java @@ -19,11 +19,11 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import com.google.inject.Singleton; import java.io.File; import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.inject.Singleton; @Singleton public class FakeConfiguration implements IConfiguration { diff --git a/priam/src/test/java/com/netflix/priam/identity/FakePriamInstanceFactory.java b/priam/src/test/java/com/netflix/priam/identity/FakePriamInstanceFactory.java index 45b826b78..73ffc311b 100644 --- a/priam/src/test/java/com/netflix/priam/identity/FakePriamInstanceFactory.java +++ b/priam/src/test/java/com/netflix/priam/identity/FakePriamInstanceFactory.java @@ -19,12 +19,12 @@ import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; -import com.google.inject.Inject; import com.netflix.priam.identity.config.InstanceInfo; -import groovy.lang.Singleton; import java.util.Comparator; import java.util.Map; import java.util.stream.Collectors; +import javax.inject.Inject; +import javax.inject.Singleton; @Singleton public class FakePriamInstanceFactory implements IPriamInstanceFactory { diff --git a/priam/src/test/java/com/netflix/priam/notification/TestBackupNotificationMgr.java b/priam/src/test/java/com/netflix/priam/notification/TestBackupNotificationMgr.java index 5ababa744..9b47889c2 100644 --- a/priam/src/test/java/com/netflix/priam/notification/TestBackupNotificationMgr.java +++ b/priam/src/test/java/com/netflix/priam/notification/TestBackupNotificationMgr.java @@ -3,7 +3,6 @@ import com.amazonaws.services.sns.model.MessageAttributeValue; import com.google.inject.Guice; import com.google.inject.Injector; -import com.google.inject.Provider; import com.netflix.priam.backup.AbstractBackupPath; import com.netflix.priam.backup.BRTestModule; import com.netflix.priam.backup.BackupVerificationResult; @@ -14,6 +13,7 @@ import java.text.ParseException; import java.time.Instant; import java.util.Map; +import javax.inject.Provider; import mockit.Capturing; import mockit.Expectations; import mockit.Mocked; diff --git a/priam/src/test/java/com/netflix/priam/resources/BackupServletV2Test.java b/priam/src/test/java/com/netflix/priam/resources/BackupServletV2Test.java index c4729aa71..d1e91f2a2 100644 --- a/priam/src/test/java/com/netflix/priam/resources/BackupServletV2Test.java +++ b/priam/src/test/java/com/netflix/priam/resources/BackupServletV2Test.java @@ -4,7 +4,6 @@ import com.google.inject.Guice; import com.google.inject.Injector; -import com.google.inject.Provider; import com.netflix.priam.backup.*; import com.netflix.priam.backupv2.MetaV2Proxy; import com.netflix.priam.backupv2.SnapshotMetaTask; @@ -22,6 +21,7 @@ import java.util.Date; import java.util.List; import java.util.Optional; +import javax.inject.Provider; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import mockit.Expectations; diff --git a/priam/src/test/java/com/netflix/priam/scheduler/TestGuiceSingleton.java b/priam/src/test/java/com/netflix/priam/scheduler/TestGuiceSingleton.java index e0eff0417..ff0f1b005 100644 --- a/priam/src/test/java/com/netflix/priam/scheduler/TestGuiceSingleton.java +++ b/priam/src/test/java/com/netflix/priam/scheduler/TestGuiceSingleton.java @@ -20,7 +20,7 @@ import com.google.inject.AbstractModule; import com.google.inject.Guice; import com.google.inject.Injector; -import com.google.inject.Singleton; +import javax.inject.Singleton; import org.junit.Test; public class TestGuiceSingleton { diff --git a/priam/src/test/java/com/netflix/priam/scheduler/TestScheduler.java b/priam/src/test/java/com/netflix/priam/scheduler/TestScheduler.java index e2da965eb..91cf999b8 100644 --- a/priam/src/test/java/com/netflix/priam/scheduler/TestScheduler.java +++ b/priam/src/test/java/com/netflix/priam/scheduler/TestScheduler.java @@ -18,13 +18,13 @@ package com.netflix.priam.scheduler; import com.google.inject.Guice; -import com.google.inject.Inject; import com.google.inject.Injector; -import com.google.inject.Singleton; import com.netflix.priam.TestModule; import com.netflix.priam.config.IConfiguration; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import javax.inject.Inject; +import javax.inject.Singleton; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test;