Andrew Wong has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/10633


Change subject: KUDU-1861 add range-partitioning of loadgen tables
......................................................................

KUDU-1861 add range-partitioning of loadgen tables

This patch adds the ability to generate a range-partitioned table to the
laodgen tool. The range partitioning schema is designed such that the
generated insert workload will be monotonically increasing if the number
of threads is equal to the number of tablets.

Below are illustrations of some tablet partitioning and thread
non-random insert workloads. The y-axis for both the threads and the
tablets is the keyspace, increasing going downwards.

--num_threads=2 --table_num_buckets=2

  Threads sequentially
  insert to their keyspaces
  in non-random insert mode.
     +  +---------+         ^
     |  | thread1 | tabletA |  Tablets' range partitions are
     |  |         |         |  set to match the desired total
     v  +---------+---------+  number of inserted rows for the
     |  | thread2 | tabletB |  entire workload, but leaving the
     |  |         |         |  outermost tablets unbounded.
     v  +---------+         v

If the number of tablets is not a multiple of the number of threads when
using an auto-generated range-partitioned table, we lose the guarantee
that we always write to a monotonically increasing range on each tablet.

--num_threads=2 --table_num_buckets=3
     +  +---------+         ^
     |  | thread1 | tabletA |
     |  |         +---------+
     v  +---------| tabletB |
     |  | thread2 +---------+
     |  |         | tabletC |
     v  +---------+         v

I tested this out on a singler-tserver cluster and verified via the
metrics logs that the number of bloom lookups for a non-random workload
where the number of insert threads and the number of tablets were equal
stayed at zero. When the number of threads was not a factor of the
number of buckets, the number of bloom lookups was non-zero.

Change-Id: If4f552a4c73dc82f3b7934082769522557ee5013
---
M src/kudu/tools/tool_action_perf.cc
1 file changed, 36 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/33/10633/1
--
To view, visit http://gerrit.cloudera.org:8080/10633
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If4f552a4c73dc82f3b7934082769522557ee5013
Gerrit-Change-Number: 10633
Gerrit-PatchSet: 1
Gerrit-Owner: Andrew Wong <aw...@cloudera.com>

Reply via email to