ndimiduk commented on a change in pull request #807: HBASE-23259: Ability to 
start minicluster with pre-determined master ports
URL: https://github.com/apache/hbase/pull/807#discussion_r344964735
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/LocalHBaseCluster.java
 ##########
 @@ -183,6 +177,47 @@ public LocalHBaseCluster(final Configuration conf, final 
int noMasters,
     }
   }
 
+  /**
+   * Create new LocalHBaseCluster using pre-defined master rpc ports. Every 
other port is picked
+   * randomly. This also populates the master addresses in the base and region 
server configs.
+   * @param conf Base configuration to use for the cluster.
+   * @param noMasters Number of masters.
+   * @param noRegionServers Number of region servers.
+   * @param masterClass Impl of master class
+   * @param regionServerClass Impl of RS class
+   * @param masterPorts Array of ports, 2 per master (RPC/INFO) to use.
 
 Review comment:
   What's the use-case for specifying the explicit ports to use? This design 
has a code-smell to me -- a test should grab whatever ports are available on 
the system and provide an interface for handing that information off to 
clients, not the other way around.
   
   Why just offer the master ports as random? If this is something we want to 
support in tests, seems like we need a `LocalHBaseClusterBuilder` that lets me 
build up a configuration, adding port pairs for master instances and region 
server instances (and possible zookeeper, data node, name node, &c).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to