bharathv 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_r345497190
##########
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:
I think I over thought about this. I've undone all of these changes and made
the patch quite simple. LMK what you think.
To give you some context, the reason I did this change is to have the master
end points (comma separated host:port values) populated in the region server
configs so that they can use the newly created master based registry to create
the internal connections. The issue though is that since the masters were using
random ports chosen at runtime, we cannot pre-create a config object before
spinning up the cluster.
But after spending some more time on it, it looks like we can actually do
that easily. The next patch just waits for the masters to be created -> figures
out the ports -> updates the conf -> spins up the region servers with that conf.
----------------------------------------------------------------
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