Mike Percy has posted comments on this change. Change subject: mini_cluster: support multiple data dirs ......................................................................
Patch Set 11: (10 comments) http://gerrit.cloudera.org:8080/#/c/7211/11/src/kudu/integration-tests/internal_mini_cluster.cc File src/kudu/integration-tests/internal_mini_cluster.cc: PS11, Line 60: fs_root_ Can we get rid of this member too? We could put this in the body of the constructor and finally get rid of this last non-opts member: if (opts_.data_root.empty()) { opts_.data_root = JoinPathSegments(GetTestDataDirectory(), "minicluster-data"); } http://gerrit.cloudera.org:8080/#/c/7211/11/src/kudu/master/master-test.cc File src/kudu/master/master-test.cc: Line 1349: TEST_F(MasterTest, TestMultiDirMaster) { If this is just unit test coverage for the MiniMaster I think it should be given its own test file, i.e. mini_master-test.cc http://gerrit.cloudera.org:8080/#/c/7211/11/src/kudu/master/mini_master.cc File src/kudu/master/mini_master.cc: Line 70: void MiniMaster::SetMasterAddresses(const vector<HostPort>& master_addrs) { nit: add CHECK(!master_) so this is only called when it's not running Line 71: opts_.master_addresses = master_addrs; nit: pass by value and use std::move() here PS11, Line 85: if (opts_.master_addresses.empty()) { : return master_->WaitForCatalogManagerInit(); : } Add comment: // Wait for catalog manager to be ready if we only have a single master. Actually, we should probably make this if (opts_.master_addresses.size() <= 1) Line 92: opts_.rpc_opts.rpc_bind_addresses = bound_rpc_.ToString(); add: CHECK(!master_) so this is only called after Shutdown() See below comment for explanation of why Shutdown() has to be called before Restart() PS11, Line 93: HostPort(bound_http_).host() no need to construct a HostPort here, just call bound_http_.host() and get the host from the Sockaddr directly. PS11, Line 94: HostPort(bound_http_).port() bound_http_.port() Line 95: Shutdown(); Restart() has unusual semantics in the minicluster* classes. They require Shutdown() to be called, then Restart() to be called. Keep this consistent for now; if you want to change those semantics later we can consider it in a separate patch across Internal and External Minicluster classes. By the way, Shutdown() is what sets bound_rpc_ and bound_http_ so AFAICT this would not really work as written. The fact that it doesn't fail any tests probably just indicates a lack of test coverage on MiniMaster. http://gerrit.cloudera.org:8080/#/c/7211/11/src/kudu/tserver/tablet_server-test.cc File src/kudu/tserver/tablet_server-test.cc: Line 2486: TEST_F(TabletServerTest, TestMultiDirServer) { This should probably be in its own file if this is just a unit test for the MiniTabletServer, i.e. mini_tablet_server-test.cc -- To view, visit http://gerrit.cloudera.org:8080/7211 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I52c9352f1a3565d58149cf2c63d37246c6b39c23 Gerrit-PatchSet: 11 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Andrew Wong <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <[email protected]> Gerrit-Reviewer: Tidy Bot Gerrit-HasComments: Yes
