You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by to...@apache.org on 2016/10/05 17:07:25 UTC
[4/4] kudu git commit: loadgen: allow configuring the number of
buckets
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 <dr...@apache.org>
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 <to...@apache.org>
Authored: Tue Oct 4 17:16:41 2016 -0700
Committer: Todd Lipcon <to...@apache.org>
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<string>({ kKeyColumnName }), 8)
+ .add_hash_partitions(vector<string>({ kKeyColumnName }), FLAGS_num_buckets)
.wait(true)
.Create());
}
@@ -570,6 +573,7 @@ unique_ptr<Mode> BuildTestMode() {
.AddOptionalParameter("string_fixed")
.AddOptionalParameter("string_len")
.AddOptionalParameter("table_name")
+ .AddOptionalParameter("num_buckets")
.AddOptionalParameter("use_random")
.Build();