Mahesh Reddy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/16859 )

Change subject: [master] Range specific hashing at table creation time.
......................................................................


Patch Set 3:

(9 comments)

http://gerrit.cloudera.org:8080/#/c/16859/3/src/kudu/common/partition.cc
File src/kudu/common/partition.cc:

http://gerrit.cloudera.org:8080/#/c/16859/3/src/kudu/common/partition.cc@417
PS3, Line 417:
             :   if (!split_rows.empty()) {
             :     for (const auto& hash_schemas : range_hash_schemas) {
             :       if (!hash_schemas.empty()) {
             :         return Status::InvalidArgument("Both 'split_rows' and 
'range_hash_schemas' cannot be "
             :                                        "populated at the same 
time.");
             :       }
             :     }
             :   }
             :
             :   if (!range_hash_schemas.empty() && range_bounds.size() != 
range_hash_schemas.size()) {
             :     return Status::InvalidArgument("The number of range bounds 
does not match the number of user"
             :                                    "supplied hash schemas.");
             :   }
> Do we have a partition-test case in which split rows is non-empty and range
nope, I can add one. Should I add another one at a higher level (in 
table_locations-itest for example) for more test coverage?


http://gerrit.cloudera.org:8080/#/c/16859/3/src/kudu/integration-tests/table_locations-itest.cc
File src/kudu/integration-tests/table_locations-itest.cc:

http://gerrit.cloudera.org:8080/#/c/16859/3/src/kudu/integration-tests/table_locations-itest.cc@216
PS3, Line 216:   auto* partition_schema_pb = req.mutable_partition_schema();
> Just FYI, this renders req.has_partition_schema() = true
yeh I thought about this and had an if check there stating if 
(!table_hash_schema.empty()). Don't think it should cause any issues given the 
way it's currently written but I will add it again to be more restrictive.


http://gerrit.cloudera.org:8080/#/c/16859/3/src/kudu/integration-tests/table_locations-itest.cc@459
PS3, Line 459: w}
> nit: add a space
Done


http://gerrit.cloudera.org:8080/#/c/16859/3/src/kudu/integration-tests/table_locations-itest.cc@473
PS3, Line 473: table wide
> nit: capitalize "Table-wide"
Done


http://gerrit.cloudera.org:8080/#/c/16859/3/src/kudu/integration-tests/table_locations-itest.cc@473
PS3, Line 473: user
> nit: these are all "user" schemas. "per-range" would be more accurate.
Done


http://gerrit.cloudera.org:8080/#/c/16859/3/src/kudu/integration-tests/table_locations-itest.cc@491
PS3, Line 491:  // Tablets returned in sorted order by partition key range.
             :     EXPECT_EQ(string("\0\0\0\0" "\0\0\0\0" "a" "\0\0", 11),
             :               
resp.tablet_locations(0).partition().partition_key_start());
             :     EXPECT_EQ(string("\0\0\0\0" "\0\0\0\1" "a" "\0\0", 11),
             :               
resp.tablet_locations(1).partition().partition_key_start());
             :
             :     EXPECT_EQ(string("\0\0\0\0" "c" "\0\0", 7),
             :               
resp.tablet_locations(2).partition().partition_key_start());
             :
             :     EXPECT_EQ(string("\0\0\0\0" "e" "\0\0", 7),
             :               
resp.tablet_locations(3).partition().partition_key_start());
             :
             :     EXPECT_EQ(string("\0\0\0\1" "\0\0\0\0" "a" "\0\0", 11),
             :               
resp.tablet_locations(4).partition().partition_key_start());
             :     EXPECT_EQ(string("\0\0\0\1" "\0\0\0\1" "a" "\0\0", 11),
             :               
resp.tablet_locations(5).partition().partition_key_start());
             :
             :     EXPECT_EQ(string("\0\0\0\1" "c" "\0\0", 7),
             :               
resp.tablet_locations(6).partition().partition_key_start());
             :
             :     EXPECT_EQ(string("\0\0\0\1" "e" "\0\0", 7),
             :               
resp.tablet_locations(7).partition().partition_key_start());
             :
             :     EXPECT_EQ(string("\0\0\0\2" "\0\0\0\0" "a" "\0\0", 11),
             :               
resp.tablet_locations(8).partition().partition_key_start());
             :     EXPECT_EQ(string("\0\0\0\2" "\0\0\0\1" "a" "\0\0", 11),
             :               
resp.tablet_locations(9).partition().partition_key_start());
             :
             :     EXPECT_EQ(string("\0\0\0\2" "c" "\0\0", 7),
             :               
resp.tablet_locations(10).partition().partition_key_start());
             :
             :     EXPECT_EQ(string("\0\0\0\2" "e" "\0\0", 7),
             :               
resp.tablet_locations(11).partition().partition_key_start());
             :
             :     EXPECT_EQ(string("\0\0\0\3" "\0\0\0\0" "a" "\0\0", 11),
             :               
resp.tablet_locations(12).partition().partition_key_start());
             :     EXPECT_EQ(string("\0\0\0\3" "\0\0\0\1" "a" "\0\0", 11),
             :               
resp.tablet_locations(13).partition().partition_key_start());
             :
             :     EXPECT_EQ(string("\0\0\0\3" "c" "\0\0", 7),
             :               
resp.tablet_locations(14).partition().partition_key_start());
             :
             :     EXPECT_EQ(string("\0\0\0\3" "e" "\0\0", 7),
             :               
resp.tablet_locations(15).partition().partition_key_start());
             :
             :     EXPECT_EQ(string("\0\0\0\4" "c" "\0\0", 7),
             :               
resp.tablet_locations(16).partition().partition_key_start());
             :
             :     EXPECT_EQ(string("\0\0\0\4" "e" "\0\0", 7),
             :               
resp.tablet_locations(17).partition().partition_key_start());
             :
             :     EXPECT_EQ(string("\0\0\0\5" "c" "\0\0", 7),
             :               
resp.tablet_locations(18).partition().partition_key_start());
> nit: it would be easier to read and extend as:
Done


http://gerrit.cloudera.org:8080/#/c/16859/3/src/kudu/master/master.proto
File src/kudu/master/master.proto:

http://gerrit.cloudera.org:8080/#/c/16859/3/src/kudu/master/master.proto@507
PS3, Line 507: per user's request
> nit: remove?
Done


http://gerrit.cloudera.org:8080/#/c/16859/3/src/kudu/master/master.proto@507
PS3, Line 507: per
> nit: for
Done


http://gerrit.cloudera.org:8080/#/c/16859/3/src/kudu/master/master.proto@508
PS3, Line 508: Only populated when user creates range bounds and not split 
rows, populated in the same order.
> nit: we can be more specific and refer to other fields. Also mind filling t
Done



--
To view, visit http://gerrit.cloudera.org:8080/16859
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8f0dcbc3324f8f2d6e99b4d169fdf5c7f7dff95d
Gerrit-Change-Number: 16859
Gerrit-PatchSet: 3
Gerrit-Owner: Mahesh Reddy <mre...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ban...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <mre...@cloudera.com>
Gerrit-Comment-Date: Wed, 16 Dec 2020 00:34:29 +0000
Gerrit-HasComments: Yes

Reply via email to