Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/18515 )

Change subject: [master] KUDU-2671: Range specific hashing during table alter 
op.
......................................................................


Patch Set 6:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/18515/6/src/kudu/master/master-test.cc
File src/kudu/master/master-test.cc:

http://gerrit.cloudera.org:8080/#/c/18515/6/src/kudu/master/master-test.cc@1017
PS6, Line 1017:   // Check the number of tablets in the table
              :   EasyCurl c;
              :   faststring buf;
              :   ASSERT_OK(c.FetchURL(Substitute("http://$0/tables";, 
mini_master_->bound_http_addr().ToString()),
              :                        &buf));
              :   string raw = buf.ToString();
              :   ASSERT_STR_CONTAINS(raw, "\"tablet_count\":\"2\"");
> That's OK, but there is a programmatic approach for doing that as well.  Pl
Ah, my bad -- GetTabletLocations isn't available since tablet servers are not 
running: this test fixture is master-only.

>From the other side, I guess the CatalogManager is accessible here since it's 
>an in-process mini-cluster.  I guess it's possible to do something like

 std::vector<scoped_refptr<TableInfo>> tables;
 master_->catalog_manager()->GetAllTables(&tables);

and then check TableInfo::num_tablets().

There is also CatalogManager::GetAllTabletsForTests() -- I guess it's possible 
to leverage that to get the count of all tablets before and after AlterTable 
call.  You can check existing scenarios in this file to see how it's used.



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iea9e3317d172c9ae76662c44b21fca9a4819930a
Gerrit-Change-Number: 18515
Gerrit-PatchSet: 6
Gerrit-Owner: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Mahesh Reddy <[email protected]>
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Comment-Date: Wed, 08 Jun 2022 06:14:33 +0000
Gerrit-HasComments: Yes

Reply via email to