hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-13382 IntegrationTestBigLinkedList should use SecureRandom (Dima Spivak)
Date Fri, 03 Apr 2015 22:33:19 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 95893ffeb -> e3d6cdd07


HBASE-13382 IntegrationTestBigLinkedList should use SecureRandom (Dima Spivak)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/e3d6cdd0
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e3d6cdd0
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e3d6cdd0

Branch: refs/heads/branch-1
Commit: e3d6cdd072d153f3d23fc59e6326abf182353bb8
Parents: 95893ff
Author: stack <stack@apache.org>
Authored: Fri Apr 3 15:32:50 2015 -0700
Committer: stack <stack@apache.org>
Committed: Fri Apr 3 15:32:50 2015 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/e3d6cdd0/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
----------------------------------------------------------------------
diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
index 6f28e20..104c5da 100644
--- a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
+++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java
@@ -23,6 +23,7 @@ import java.io.DataOutput;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InterruptedIOException;
+import java.security.SecureRandom;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Iterator;
@@ -306,7 +307,8 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase
{
         public void initialize(InputSplit arg0, TaskAttemptContext context)
             throws IOException, InterruptedException {
           numNodes = context.getConfiguration().getLong(GENERATOR_NUM_ROWS_PER_MAP_KEY, 25000000);
-          rand = new Random();
+          // Use SecureRandom to avoid issue described in HBASE-13382.
+          rand = new SecureRandom();
         }
 
         @Override
@@ -1359,7 +1361,7 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase
{
       if (cmd.hasOption('n')) {
         maxQueries = Long.parseLong(cmd.getOptionValue("n"));
       }
-      Random rand = new Random();
+      Random rand = new SecureRandom();
       boolean isSpecificStart = cmd.hasOption('s');
       byte[] startKey = isSpecificStart ? Bytes.toBytesBinary(cmd.getOptionValue('s')) :
null;
       int logEvery = cmd.hasOption('l') ? Integer.parseInt(cmd.getOptionValue('l')) : 1;


Mime
View raw message