Mike Percy has posted comments on this change. Change subject: Create base class for MiniCluster and ExternalMiniCluster ......................................................................
Patch Set 6: (5 comments) http://gerrit.cloudera.org:8080/#/c/3974/6/src/kudu/integration-tests/external_mini_cluster.h File src/kudu/integration-tests/external_mini_cluster.h: Line 143: void Shutdown(ClusterNodes nodes) override; > I feel like this is a case where a default argument (ALL) would be nice, si I feel your pain, but since this C++ is a pain about default arguments with polymorphism. The default argument is associated with the static type of the pointer: http://stackoverflow.com/questions/5273144/c-polymorphism-and-default-argument It's quite gross, so either we set the default = ALL in the superclass and base classes, and just make sure that nobody makes them inconsistent over time, or we live with having to pass an argument. I chose the latter since I thought the former was kind of nerve wracking. http://gerrit.cloudera.org:8080/#/c/3974/6/src/kudu/integration-tests/mini_cluster_base.h File src/kudu/integration-tests/mini_cluster_base.h: PS6, Line 36: Base class for MiniCluster implementations > I think we should also make interfaces for Master and TabletServer (and may sounds alright, but I don't have a use case for it so let's defer Line 39: class MiniClusterBase { > I don't mean to bikeshed, but I think it would be great if this were just c I would tend to agree but I don't want to make this change as part of this commit since this is pretty yak shavey. Line 54: > I think you can add GetLeaderMasterIndex() too; it's common across both clu would prefer to defer this to when we need it Line 61: virtual Status CreateClient(client::KuduClientBuilder* builder, > style: I don't think using a pointer to denote 'optional' is the best. This This is tough to do because KuduClientBuilder is a PIMPLed class and is not copyable or movable, and needs to be modified by the callee (can't be const). So I don't think I can pass it in via an optional, unless I make it a ptr-to-optional, which would be painful. -- To view, visit http://gerrit.cloudera.org:8080/3974 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I62256168a9245c845e99f7253f07e69a225954bf Gerrit-PatchSet: 6 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Mike Percy <mpe...@apache.org> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Dinesh Bhat <din...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <mpe...@apache.org> Gerrit-Reviewer: Todd Lipcon <t...@apache.org> Gerrit-HasComments: Yes