From commits-return-23243-archive-asf-public=cust-asf.ponee.io@accumulo.apache.org Tue Jul 30 18:17:30 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 13E01180607 for ; Tue, 30 Jul 2019 20:17:29 +0200 (CEST) Received: (qmail 19482 invoked by uid 500); 30 Jul 2019 18:17:29 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 19471 invoked by uid 99); 30 Jul 2019 18:17:29 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jul 2019 18:17:29 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 4360485EAD; Tue, 30 Jul 2019 18:17:29 +0000 (UTC) Date: Tue, 30 Jul 2019 18:17:29 +0000 To: "commits@accumulo.apache.org" Subject: [accumulo-testing] branch master updated: Use non blocking secure random for seeding. (#106) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <156451064922.637.16119020589858516180@gitbox.apache.org> From: kturner@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: accumulo-testing X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 862144fa5089c6ebd3d82fe9386ee2dd9f49c091 X-Git-Newrev: b3a3823583b7cea747d54e2e09922fc665783bea X-Git-Rev: b3a3823583b7cea747d54e2e09922fc665783bea X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. kturner pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/accumulo-testing.git The following commit(s) were added to refs/heads/master by this push: new b3a3823 Use non blocking secure random for seeding. (#106) b3a3823 is described below commit b3a3823583b7cea747d54e2e09922fc665783bea Author: Keith Turner AuthorDate: Tue Jul 30 14:17:24 2019 -0400 Use non blocking secure random for seeding. (#106) When attempting to generate bulk data to ingest, map reduce jobs were timing out. The jobs were blocked in SecureRandom code for over 10 minutes (likely trying to read /dev/random, but not sure about this). This change creates a SecureRandom that should be non-blocking with Java's default configs. With this change generating bulk data no longer times out. --- .../accumulo/testing/continuous/ContinuousInputFormat.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/apache/accumulo/testing/continuous/ContinuousInputFormat.java b/src/main/java/org/apache/accumulo/testing/continuous/ContinuousInputFormat.java index 4399e3f..ecf8172 100644 --- a/src/main/java/org/apache/accumulo/testing/continuous/ContinuousInputFormat.java +++ b/src/main/java/org/apache/accumulo/testing/continuous/ContinuousInputFormat.java @@ -25,7 +25,6 @@ import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.nio.charset.StandardCharsets; -import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import java.util.ArrayList; import java.util.List; @@ -130,12 +129,8 @@ public class ContinuousInputFormat extends InputFormat { maxQual = job.getConfiguration().getInt(PROP_QUAL_MAX, Short.MAX_VALUE); checksum = job.getConfiguration().getBoolean(PROP_CHECKSUM, false); - try { - random = new Random(SecureRandom.getInstanceStrong().nextLong()); - } catch (NoSuchAlgorithmException e) { - throw new AssertionError( - "Seeding random from a strong secure random algorithm should never fail", e); - } + random = new Random(new SecureRandom().nextLong()); + nodeCount = 0; }