Zoltan Chovan has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21823 )

Change subject: KUDU-3608: REST API for Metadata Management
......................................................................


Patch Set 30:

(4 comments)

http://gerrit.cloudera.org:8080/#/c/21823/30/src/kudu/master/master.cc
File src/kudu/master/master.cc:

http://gerrit.cloudera.org:8080/#/c/21823/30/src/kudu/master/master.cc@179
PS30, Line 179: LOG(ERROR) << "REST API endpoints cannot be enabled when 
webserver is disabled. "
              :           << "Please set --webserver_enabled=true to use REST 
API.";
              :   return false;
nit: wrong ident


http://gerrit.cloudera.org:8080/#/c/21823/30/src/kudu/master/rest_catalog_path_handlers.cc
File src/kudu/master/rest_catalog_path_handlers.cc:

http://gerrit.cloudera.org:8080/#/c/21823/30/src/kudu/master/rest_catalog_path_handlers.cc@69
PS30, Line 69: CatalogManager::ScopedLeaderSharedLock 
l(master_->catalog_manager());
             :   if (!l.catalog_status().ok()) {
             :     RETURN_JSON_ERROR(
             :         jw, l.catalog_status().ToString(), resp->status_code, 
HttpStatusCode::ServiceUnavailable);
             :   }
             :   if (!l.leader_status().ok()) {
             :     RETURN_JSON_ERROR(
             :         jw, "Master is not the leader", resp->status_code, 
HttpStatusCode::ServiceUnavailable);
             :   }
consider extracting this to a utility method, to avoid repeated use


http://gerrit.cloudera.org:8080/#/c/21823/30/src/kudu/master/rest_catalog_path_handlers.cc@106
PS30, Line 106:   if (req.request_method == "GET") {
why not simplify these checks, so that the locks are only checked once, then 
route the request to the relevant handler, e.g.

if(LocksAreOkay()) {
 if (POST) HandlePostTables()
 else if (GET) HandlePostTables()
}


http://gerrit.cloudera.org:8080/#/c/21823/30/src/kudu/master/rest_catalog_path_handlers.cc@234
PS30, Line 234: 60
consider making this a flag instead of a hard coded value



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I67f964c4f950edfde31772cafd5c3ed5d6b87413
Gerrit-Change-Number: 21823
Gerrit-PatchSet: 30
Gerrit-Owner: Gabriella Lotz <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Gabriella Lotz <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <[email protected]>
Gerrit-Reviewer: Zoltan Chovan <[email protected]>
Gerrit-Comment-Date: Mon, 24 Mar 2025 13:15:28 +0000
Gerrit-HasComments: Yes

Reply via email to