Hello Mahesh Reddy,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/17890
to look at the new patch set (#4).
Change subject: KUDU-2671 introduce PartitionKey
......................................................................
KUDU-2671 introduce PartitionKey
This changelist introduces a dedicated PartitionKey data structure to
represent a table's partition key. The crux is in keeping the hash and
the range part of the key separately, so it's possible to properly work
with such an entity without the context of a particular range or tablet.
Before this patch, encoded partition keys were represented as strings that
had the hash and the range parts concatenated: it was always possible to
properly decode such a key having only table-wide information in the
context because every range had the same hash schema. However, once
custom hash schemas per range were introduced, now it's impossible to
properly decode such a compound key without knowing the particular hash
schema that was used to encode the key.
The ordering of PartitionKeys in this changelist follows the legacy
notation of comparing the hash part of the key first and then the range
part, but it's going to change in a follow-up changelist because that's
the proper way to do so w.r.t. the logic of the PartitionPruner. Also,
the updated comparison operator for PartitionKey requires corresponding
changes in the catalog manager and client's meta-cache.
I decided to split the changes for easier tracking and reviewing.
As a result, a few new tests scenarios related to using custom hash
schemas per range partition is not working as expected yet because they
require the comparison operator for PartitionKey to be updated:
* FlexPartitioningCreateTableTest.NoUpperBoundRangeCustomHashSchema
* PartitionPrunerTest.TestHashSchemasPerRangePruning
* PartitionPrunerTest.TestSingleRangeElementAndBoundaryCase
That is going to be addressed in a follow-up changelist as well.
As a by-product of this change, the following methods of the
PartitionSchema class started working as needed in case of a table with
per-range custom hash schemas:
* PartitionKeyDebugStringImpl()
* PartitionKeyDebugString()
I was also thinking about introducing an extra field to ScanTokenPB,
like the newly added GetTableLocationsRequestPB::partition_key_range
field, or rely on the ScanTokenPB::tablet_metadata field to extract
the hash and the range parts out of the strings representing lower and
upper scan boundaries, but I realized that deserves to be done in a
separate changelist.
Change-Id: I00255ec404beeb999117f5265de0d5d8deaf0d68
---
M src/kudu/client/batcher.cc
M src/kudu/client/client-test.cc
M src/kudu/client/client.cc
M src/kudu/client/client.h
M src/kudu/client/flex_partitioning_client-test.cc
M src/kudu/client/meta_cache.cc
M src/kudu/client/meta_cache.h
M src/kudu/client/partitioner-internal.cc
M src/kudu/client/partitioner-internal.h
M src/kudu/client/scan_configuration.cc
M src/kudu/client/scan_configuration.h
M src/kudu/client/scan_token-internal.cc
M src/kudu/client/scanner-internal.cc
M src/kudu/client/scanner-internal.h
M src/kudu/common/common.proto
M src/kudu/common/partition-test.cc
M src/kudu/common/partition.cc
M src/kudu/common/partition.h
M src/kudu/common/partition_pruner-test.cc
M src/kudu/common/partition_pruner.cc
M src/kudu/common/partition_pruner.h
M src/kudu/common/scan_spec.cc
M src/kudu/common/scan_spec.h
M src/kudu/integration-tests/table_locations-itest.cc
M src/kudu/master/catalog_manager-test.cc
M src/kudu/master/catalog_manager.cc
M src/kudu/master/catalog_manager.h
M src/kudu/master/master.proto
M src/kudu/master/master_path_handlers.cc
M src/kudu/tools/table_scanner.cc
M src/kudu/tools/tool_action_table.cc
31 files changed, 1,096 insertions(+), 697 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/90/17890/4
--
To view, visit http://gerrit.cloudera.org:8080/17890
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I00255ec404beeb999117f5265de0d5d8deaf0d68
Gerrit-Change-Number: 17890
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Mahesh Reddy <[email protected]>