Wang Xixu has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/19584 )

Change subject: [KUDU-3452] A tool to report on table creation progress
......................................................................


Patch Set 12:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/19584/11/src/kudu/master/catalog_manager.cc
File src/kudu/master/catalog_manager.cc:

http://gerrit.cloudera.org:8080/#/c/19584/11/src/kudu/master/catalog_manager.cc@3951
PS11, Line 3951:     continue;
               :     }
               :     vector<scoped_refptr<TabletInfo>> tablets;
               :     table->GetAllTablets(&tablets);
               :     int num_tablets_in_flight = 0;
               :     for (const auto& tablet : tablets) {
               :       TabletMetadataLock tablet_lock(tablet.get(), 
LockMode::READ);
               :       if (!tablet_lock.data().is_creating()) {
               :         continue;
               :       }
               :       num_tablets_in_flight++;
               :     }
               :     // Creating table has 2 steps. The first step is to create 
the metadata
               :     // of the table in catalog manager and after that the 
status of the table
               :     // will be 'RUNNING'. The second step is to create all 
replicas of the table
               :     // asynchronously.
               :     // The table is on creating or altering when the number of 
creating tablets
               :     // is not 0.
               :     if (num_tablets_in_flight <= 0) {
               :       continue;
               :     }
               :
               :     ListInFlightTablesResponsePB::TableInfo* table_info = 
resp->add_tables();
               :     table_info->set_id(table->id());
               :     table_info->set_name(table_lock.data().name());
               :     table_info->set_num_tablets(tablets.size());
               :     
table_info->set_num_tablets_in_flight(num_tablets_in_flight);
               :     table_info->set_state(table_lock.data().pb.state());
               :   }
               :   return Status::OK();
               : }
               :
               : Status CatalogManager::ListTables(const ListTablesRequestPB* 
req,
               :                                   ListTablesResponsePB* resp,
               :                                   const optional<string>& 
user) {
               :   leader_lock_.AssertAcquiredForReading();
               :
> This code block seems used to implement a standalone function. It would be
OK. I will use a separate RPC interface for listing in-flight tables. Thanks.


http://gerrit.cloudera.org:8080/#/c/19584/11/src/kudu/tools/tool_action_table.cc
File src/kudu/tools/tool_action_table.cc:

http://gerrit.cloudera.org:8080/#/c/19584/11/src/kudu/tools/tool_action_table.cc@890
PS11, Line 890:     table_info_pb->set_id(table.id());
> If this flag cannot be set by users, could we just use it as a parameter of
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I348b69f48e6ce36ed869097f9f798c5946136de5
Gerrit-Change-Number: 19584
Gerrit-PatchSet: 12
Gerrit-Owner: Wang Xixu <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Ashwani Raina <[email protected]>
Gerrit-Reviewer: KeDeng <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Wang Xixu <[email protected]>
Gerrit-Reviewer: Yifan Zhang <[email protected]>
Gerrit-Reviewer: Yingchun Lai <[email protected]>
Gerrit-Reviewer: Yuqi Du <[email protected]>
Gerrit-Comment-Date: Mon, 29 May 2023 07:13:47 +0000
Gerrit-HasComments: Yes

Reply via email to