You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2014/04/24 00:21:12 UTC
[1/3] git commit: ACCUMULO-2728 Ensure rand int is positive for
VolumeUtil
Repository: accumulo
Updated Branches:
refs/heads/1.6.0-SNAPSHOT 9621701fd -> 0d10bda87
refs/heads/master 7492d7478 -> 3c40b529b
ACCUMULO-2728 Ensure rand int is positive for VolumeUtil
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0d10bda8
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0d10bda8
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0d10bda8
Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 0d10bda874240ddc8ead68d850b46e4f48566634
Parents: 9621701
Author: Christopher Tubbs <ct...@apache.org>
Authored: Wed Apr 23 18:14:42 2014 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Wed Apr 23 18:14:42 2014 -0400
----------------------------------------------------------------------
.../src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0d10bda8/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
index 2ef438f..34abb01 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
@@ -52,6 +52,7 @@ import org.apache.log4j.Logger;
public class VolumeUtil {
private static final Logger log = Logger.getLogger(VolumeUtil.class);
+ private static final SecureRandom rand = new SecureRandom();
private static boolean isActiveVolume(Path dir) {
@@ -157,7 +158,6 @@ public class VolumeUtil {
}
}
-
public static Text switchRootTabletVolume(KeyExtent extent, Text location) throws IOException {
if (extent.isRootTablet()) {
String newLocation = switchVolume(location.toString(), FileType.TABLE, ServerConstants.getVolumeReplacements());
@@ -344,8 +344,7 @@ public class VolumeUtil {
}
private static Path getBackupName(FileSystem fs, Path path) {
- SecureRandom rand = new SecureRandom();
- return new Path(path.getParent(), path.getName() + "_" + System.currentTimeMillis() + "_" + Math.abs(rand.nextInt()) + ".bak");
+ return new Path(path.getParent(), path.getName() + "_" + System.currentTimeMillis() + "_" + (rand.nextInt(Integer.MAX_VALUE) + 1) + ".bak");
}
}
[3/3] git commit: Merge branch '1.6.0-SNAPSHOT'
Posted by ct...@apache.org.
Merge branch '1.6.0-SNAPSHOT'
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/3c40b529
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/3c40b529
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/3c40b529
Branch: refs/heads/master
Commit: 3c40b529bcf9fa96e96b07eae0f5e99c503a358d
Parents: 7492d74 0d10bda
Author: Christopher Tubbs <ct...@apache.org>
Authored: Wed Apr 23 18:20:49 2014 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Wed Apr 23 18:20:49 2014 -0400
----------------------------------------------------------------------
.../src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[2/3] git commit: ACCUMULO-2728 Ensure rand int is positive for
VolumeUtil
Posted by ct...@apache.org.
ACCUMULO-2728 Ensure rand int is positive for VolumeUtil
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/0d10bda8
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/0d10bda8
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/0d10bda8
Branch: refs/heads/master
Commit: 0d10bda874240ddc8ead68d850b46e4f48566634
Parents: 9621701
Author: Christopher Tubbs <ct...@apache.org>
Authored: Wed Apr 23 18:14:42 2014 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Wed Apr 23 18:14:42 2014 -0400
----------------------------------------------------------------------
.../src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/0d10bda8/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
index 2ef438f..34abb01 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/fs/VolumeUtil.java
@@ -52,6 +52,7 @@ import org.apache.log4j.Logger;
public class VolumeUtil {
private static final Logger log = Logger.getLogger(VolumeUtil.class);
+ private static final SecureRandom rand = new SecureRandom();
private static boolean isActiveVolume(Path dir) {
@@ -157,7 +158,6 @@ public class VolumeUtil {
}
}
-
public static Text switchRootTabletVolume(KeyExtent extent, Text location) throws IOException {
if (extent.isRootTablet()) {
String newLocation = switchVolume(location.toString(), FileType.TABLE, ServerConstants.getVolumeReplacements());
@@ -344,8 +344,7 @@ public class VolumeUtil {
}
private static Path getBackupName(FileSystem fs, Path path) {
- SecureRandom rand = new SecureRandom();
- return new Path(path.getParent(), path.getName() + "_" + System.currentTimeMillis() + "_" + Math.abs(rand.nextInt()) + ".bak");
+ return new Path(path.getParent(), path.getName() + "_" + System.currentTimeMillis() + "_" + (rand.nextInt(Integer.MAX_VALUE) + 1) + ".bak");
}
}