Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/20868 )
Change subject: KUDU-3543 Fix Content-Type headers ...................................................................... Patch Set 5: Code-Review+1 (12 comments) Overall looks good to me, a few nits and one question about diverging the list of actual webserver's endpoints and its current snapshot hard-coded in test_util.cc http://gerrit.cloudera.org:8080/#/c/20868/5/src/kudu/master/master-test.cc File src/kudu/master/master-test.cc: http://gerrit.cloudera.org:8080/#/c/20868/5/src/kudu/master/master-test.cc@3818 PS5, Line 3818: string table_id nit: this could be just a const ref since create_table_resp is kept around, but at least consider adding 'const' to be more explicit of the intents for 'table_id' in the code below http://gerrit.cloudera.org:8080/#/c/20868/5/src/kudu/master/master-test.cc@3828 PS5, Line 3828: string addr = Substitute("http://$0", mini_master_->bound_http_addr().ToString()); nit: ditto -- consider adding 'const', and maybe also switch to 'auto' instead tediously specifying the type of the 'addr' variable? http://gerrit.cloudera.org:8080/#/c/20868/5/src/kudu/master/master-test.cc@3834 PS5, Line 3834: expected_content_type nit: could get rid of extra variable and inline the call to Substitute right here http://gerrit.cloudera.org:8080/#/c/20868/5/src/kudu/tserver/tablet_server-test.cc File src/kudu/tserver/tablet_server-test.cc: http://gerrit.cloudera.org:8080/#/c/20868/5/src/kudu/tserver/tablet_server-test.cc@623 PS5, Line 623: TEST_F(TabletServerTest, TestTabletServerContentTypeHeaders) { nit: same as for master-test.cc http://gerrit.cloudera.org:8080/#/c/20868/5/src/kudu/util/test_util.h File src/kudu/util/test_util.h: http://gerrit.cloudera.org:8080/#/c/20868/5/src/kudu/util/test_util.h@205 PS5, Line 205: std::unordered_map<std::string, std::string> GetCommonWebserverEndpoints(); Please document each of the newly added functions. Essentially, the name is close to self-explanatory, but that's important to mention are keys and values of the returned dictionaries. http://gerrit.cloudera.org:8080/#/c/20868/5/src/kudu/util/test_util.cc File src/kudu/util/test_util.cc: http://gerrit.cloudera.org:8080/#/c/20868/5/src/kudu/util/test_util.cc@659 PS5, Line 659: std::unordered_map<std::string, std::string> GetCommonWebserverEndpoints() nit: consider instantiating static instance of a map and returning const reference http://gerrit.cloudera.org:8080/#/c/20868/5/src/kudu/util/test_util.cc@688 PS5, Line 688: {"tracing/json/simple_dump", kContentTypeTextPlain}}; What if this list starts diverging from the actual list of the endpoints served by embedded webservers? Is there is a way to enforce updating this and other lists in this file when a new end-point is added for the embedded webserver? http://gerrit.cloudera.org:8080/#/c/20868/5/src/kudu/util/test_util.cc@692 PS5, Line 692: std:: nit: remove the 'std' prefix since there is corresponding 'using' directive in the beginning of the file http://gerrit.cloudera.org:8080/#/c/20868/5/src/kudu/util/test_util.cc@692 PS5, Line 692: std::unordered_map nit here and elsewhere: add corresponding 'using' directive and remove 'std::' prefix http://gerrit.cloudera.org:8080/#/c/20868/5/src/kudu/util/test_util.cc@694 PS5, Line 694: return {{"scans", kContentTypeTextHtml}, nit: ditto for changing the signature of this function http://gerrit.cloudera.org:8080/#/c/20868/5/src/kudu/util/test_util.cc@696 PS5, Line 696: strings:: nit for here and below: remove the 'strings::' prefix since there is corresponding directive in the beginning of this file http://gerrit.cloudera.org:8080/#/c/20868/5/src/kudu/util/test_util.cc@708 PS5, Line 708: return {{"tablet-servers", kContentTypeTextHtml}, nit: ditto for changing the signature of this function -- To view, visit http://gerrit.cloudera.org:8080/20868 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I746dcfbaadb2fb95292c2d4047cb7adb9971b42f Gerrit-Change-Number: 20868 Gerrit-PatchSet: 5 Gerrit-Owner: Marton Greber <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Attila Bukor <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Marton Greber <[email protected]> Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Zoltan Chovan <[email protected]> Gerrit-Comment-Date: Sat, 03 Aug 2024 00:26:11 +0000 Gerrit-HasComments: Yes
