Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 77A6D200BA3 for ; Wed, 5 Oct 2016 19:07:37 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7651B160ADE; Wed, 5 Oct 2016 17:07:37 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C5FD6160AC9 for ; Wed, 5 Oct 2016 19:07:36 +0200 (CEST) Received: (qmail 86909 invoked by uid 500); 5 Oct 2016 17:07:33 -0000 Mailing-List: contact commits-help@kudu.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kudu.apache.org Delivered-To: mailing list commits@kudu.apache.org Received: (qmail 85985 invoked by uid 99); 5 Oct 2016 17:07:23 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Oct 2016 17:07:23 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0DB20E09D0; Wed, 5 Oct 2016 17:07:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: todd@apache.org To: commits@kudu.apache.org Date: Wed, 05 Oct 2016 17:07:25 -0000 Message-Id: <97bf5fbff6db4ecbb19d08dd5cf8e3ba@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [4/4] kudu git commit: loadgen: allow configuring the number of buckets archived-at: Wed, 05 Oct 2016 17:07:37 -0000 loadgen: allow configuring the number of buckets Change-Id: Idf0ae3e95b90d38829dba67a9ccc2dfbe2b5b09b Reviewed-on: http://gerrit.cloudera.org:8080/4625 Tested-by: Kudu Jenkins Reviewed-by: David Ribeiro Alves Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/07d190c3 Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/07d190c3 Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/07d190c3 Branch: refs/heads/master Commit: 07d190c3e47661e762c56c8405370e37b9e989ac Parents: b70d362 Author: Todd Lipcon Authored: Tue Oct 4 17:16:41 2016 -0700 Committer: Todd Lipcon Committed: Wed Oct 5 17:06:13 2016 +0000 ---------------------------------------------------------------------- src/kudu/tools/tool_action_test.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/07d190c3/src/kudu/tools/tool_action_test.cc ---------------------------------------------------------------------- diff --git a/src/kudu/tools/tool_action_test.cc b/src/kudu/tools/tool_action_test.cc index f528f38..29b8950 100644 --- a/src/kudu/tools/tool_action_test.cc +++ b/src/kudu/tools/tool_action_test.cc @@ -193,6 +193,9 @@ DEFINE_string(table_name, "", "an already existing table, it's highly recommended to use a " "dedicated table created just for testing purposes: " "the existing table nor its data is never dropped/deleted."); +DEFINE_int32(num_buckets, 8, + "The number of buckets to create when this tool creates a new table."); + DEFINE_bool(use_random, false, "Whether to use random numbers instead of sequential ones. " "In case of using random numbers collisions are possible over " @@ -495,7 +498,7 @@ Status TestLoadGenerator(const RunnerContext& context) { RETURN_NOT_OK(table_creator->table_name(table_name) .schema(&schema) .num_replicas(1) - .add_hash_partitions(vector({ kKeyColumnName }), 8) + .add_hash_partitions(vector({ kKeyColumnName }), FLAGS_num_buckets) .wait(true) .Create()); } @@ -570,6 +573,7 @@ unique_ptr BuildTestMode() { .AddOptionalParameter("string_fixed") .AddOptionalParameter("string_len") .AddOptionalParameter("table_name") + .AddOptionalParameter("num_buckets") .AddOptionalParameter("use_random") .Build();