hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject hbase git commit: HBASE-13382 IntegrationTestBigLinkedList should use SecureRandom (Dima Spivak)
Date Mon, 04 May 2015 21:32:37 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 ca6e942e5 -> 4e83f5781


HBASE-13382 IntegrationTestBigLinkedList should use SecureRandom (Dima Spivak)

Conflicts:
	hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java


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

Branch: refs/heads/0.98
Commit: 4e83f5781c2ce885a06f2956b803990ebadb3425
Parents: ca6e942
Author: stack <stack@apache.org>
Authored: Fri Apr 3 15:32:50 2015 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Mon May 4 14:30:37 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/4e83f578/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 74f2400..c7ae733 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
@@ -21,6 +21,7 @@ package org.apache.hadoop.hbase.test;
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
+import java.security.SecureRandom;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Iterator;
@@ -265,7 +266,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
@@ -965,7 +967,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