Wang Xixu has posted comments on this change. ( http://gerrit.cloudera.org:8080/18604 )
Change subject: [Tools] Support to config hash bucket numbers when copy a table ...................................................................... Patch Set 7: (9 comments) > Patch Set 6: > > (9 comments) http://gerrit.cloudera.org:8080/#/c/18604/6//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/18604/6//COMMIT_MSG@10 PS6, Line 10: config > configure Done http://gerrit.cloudera.org:8080/#/c/18604/6//COMMIT_MSG@12 PS6, Line 12: mig > might Done http://gerrit.cloudera.org:8080/#/c/18604/6//COMMIT_MSG@12 PS6, Line 12: t contained a lot : of data in it > contained a lot of data Done http://gerrit.cloudera.org:8080/#/c/18604/6//COMMIT_MSG@13 PS6, Line 13: the table to > the table Done http://gerrit.cloudera.org:8080/#/c/18604/6//COMMIT_MSG@14 PS6, Line 14: to store. And there is > drop this part Done http://gerrit.cloudera.org:8080/#/c/18604/6//COMMIT_MSG@14 PS6, Line 14: t a way to change the number of hash : buckets in the partition schema of an already existing > And there isn't a way to change the number of hush buckets in the partition Done http://gerrit.cloudera.org:8080/#/c/18604/6/src/kudu/tools/table_scanner.cc File src/kudu/tools/table_scanner.cc: http://gerrit.cloudera.org:8080/#/c/18604/6/src/kudu/tools/table_scanner.cc@433 PS6, Line 433: if (!partition_schema.hash_schema().empty()) { : vector<string> hash_ > nit: consider moving these variables where they belong -- inside the 'for() Done http://gerrit.cloudera.org:8080/#/c/18604/6/src/kudu/tools/table_scanner.cc@437 PS6, Line 437: int bucket_num = 0; > nit: misaligned indent Done http://gerrit.cloudera.org:8080/#/c/18604/6/src/kudu/tools/table_scanner.cc@450 PS6, Line 450: } : int i = 0; : for (const auto& hash_dimension : partition_schema.hash_schema()) { : int num_buckets = hash_bucket_nums[i] != -1 ? hash_bucket_nums[i] : : hash_dimension.num_buckets; : auto hash_columns = convert_column_ids_to_names(hash_dimension.column_ids); : table_creator->add_hash_partitions(hash_columns, : num_buckets, : hash_dimension.seed); : > What if the number of hash buckets specified in the command line doesn't ma The size of vector<int> hash_bucket_nums will exactly be equal to the size of partition_schema.hash_schema(). If the number of hash buckets in the command line is less than the number of hash dimensions, it will be set to -1 default. If it is larger than the number of hash dimension in the table, it will be ignored. -- To view, visit http://gerrit.cloudera.org:8080/18604 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1cec38e5ea09c66bfed20622b85033602da60d41 Gerrit-Change-Number: 18604 Gerrit-PatchSet: 7 Gerrit-Owner: Wang Xixu <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Wang Xixu <[email protected]> Gerrit-Reviewer: Yingchun Lai <[email protected]> Gerrit-Comment-Date: Tue, 28 Jun 2022 08:28:07 +0000 Gerrit-HasComments: Yes
