From fc85bb48dd10b3c1910fd969209f62657e6bc785 Mon Sep 17 00:00:00 2001 From: zmarois Date: Mon, 27 Nov 2017 13:33:23 -0500 Subject: [PATCH] removing superfluous changes: TODO squash --- .../com/netflix/priam/backup/SnapshotBackup.java | 1 - .../netflix/priam/identity/InstanceIdentity.java | 14 ++------------ .../priam/notification/BackupNotificationMgr.java | 1 - 3 files changed, 2 insertions(+), 14 deletions(-) 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 45ab52f32..f8cb7351d 100644 --- a/priam/src/main/java/com/netflix/priam/backup/SnapshotBackup.java +++ b/priam/src/main/java/com/netflix/priam/backup/SnapshotBackup.java @@ -158,7 +158,6 @@ public Void retriableCall() throws Exception { }.call(); } - @Override public String getName() { return JOBNAME; 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 379e36a06..74327d63d 100644 --- a/priam/src/main/java/com/netflix/priam/identity/InstanceIdentity.java +++ b/priam/src/main/java/com/netflix/priam/identity/InstanceIdentity.java @@ -80,11 +80,9 @@ public boolean test(PriamInstance input) { private PriamInstance myInstance; private String backupIdentifier; - private String token; private boolean outOfService = false; private boolean isReplace = false; private boolean isTokenPregenerated = false; - private boolean initialized = true; private String replacedIp = ""; private IDeadTokenRetriever deadTokenRetriever; private IPreGeneratedTokenRetriever preGeneratedTokenRetriever; @@ -254,9 +252,6 @@ public void forEachExecution() { { backupIdentifier = myInstance.getToken(); } - - token = myInstance.getToken(); - initialized = true; } private void populateRacMap() { @@ -337,12 +332,7 @@ public void setBackupIdentifier(String backupIdentifier) public String getToken() { - return token; - } - - public void setToken(String token) - { - this.token = token; + return myInstance.getToken(); } public String getInstanceId() @@ -362,6 +352,6 @@ public String getHostName() public boolean isExternallyDefinedToken() { - return initialized && StringUtils.isNotBlank(token); + return StringUtils.isNotBlank(getToken()); } } \ No newline at end of file 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 d434af0bd..7b5d82a7a 100644 --- a/priam/src/main/java/com/netflix/priam/notification/BackupNotificationMgr.java +++ b/priam/src/main/java/com/netflix/priam/notification/BackupNotificationMgr.java @@ -52,7 +52,6 @@ private void notify(AbstractBackupPath abp, String uploadStatus) { jsonObject.put("region", abp.getRegion()); jsonObject.put("rack", this.config.getRac()); jsonObject.put("token", abp.getNodeIdentifier()); - jsonObject.put("token", abp.getNodeIdentifier()); jsonObject.put("nodeIdentifier", abp.getNodeIdentifier()); jsonObject.put("filename", abp.getFileName()); jsonObject.put("uncompressfilesize", abp.getSize());