You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2014/03/14 22:11:31 UTC
[05/26] git commit: ACCUMULO-2061 Stop recomputing the same thing 3
times
ACCUMULO-2061 Stop recomputing the same thing 3 times
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/7cb3b23a
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/7cb3b23a
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/7cb3b23a
Branch: refs/heads/ACCUMULO-2061
Commit: 7cb3b23ab4aed63547ad2d5be964e61b27e7fc47
Parents: 575e541
Author: Josh Elser <el...@apache.org>
Authored: Wed Mar 12 12:13:25 2014 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Wed Mar 12 12:13:25 2014 -0400
----------------------------------------------------------------------
.../java/org/apache/accumulo/server/util/ChangeSecret.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/7cb3b23a/server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java b/server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java
index 3f33a0e..f0dcd14 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java
@@ -146,9 +146,10 @@ public class ChangeSecret {
private static void updateHdfs(VolumeManager fs, Instance inst, String newInstanceId) throws IOException {
// Need to recreate the instanceId on all of them to keep consistency
for (Volume v : fs.getVolumes()) {
- v.getFileSystem().delete(ServerConstants.getInstanceIdLocation(v), true);
- v.getFileSystem().mkdirs(ServerConstants.getInstanceIdLocation(v));
- v.getFileSystem().create(new Path(ServerConstants.getInstanceIdLocation(v), newInstanceId)).close();
+ final Path instanceId = ServerConstants.getInstanceIdLocation(v);
+ v.getFileSystem().delete(instanceId, true);
+ v.getFileSystem().mkdirs(instanceId);
+ v.getFileSystem().create(new Path(instanceId, newInstanceId)).close();
}
}