[
https://issues.apache.org/jira/browse/HBASE-20027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16370567#comment-16370567
]
Andrew Purtell commented on HBASE-20027:
----------------------------------------
The LocalHBaseCluster cluster forces port assignment to be random for sake of
concurrent unit test execution friendliness
{code:java}
// Always have masters and regionservers come up on port '0' so we don't
// clash over default ports.
conf.set(HConstants.MASTER_PORT, "0");
conf.set(HConstants.REGIONSERVER_PORT, "0");
if (conf.getInt(HConstants.REGIONSERVER_INFO_PORT, 0) != -1) {
conf.set(HConstants.REGIONSERVER_INFO_PORT, "0");
}
if (conf.getInt(HConstants.MASTER_INFO_PORT, 0) != -1) {
conf.set(HConstants.MASTER_INFO_PORT, "0");
}
{code}
I checked on a real distributed cluster and port assignments look ok. Let me
see about a positive unit test for port assignment even with the
LocalHBaseCluster behavior in place. Can be as simple as a test only config
that bypasses these assignments and lets the test specify a specific port for
sake of verification.
> Port assignments in site configuration are ignored
> --------------------------------------------------
>
> Key: HBASE-20027
> URL: https://issues.apache.org/jira/browse/HBASE-20027
> Project: HBase
> Issue Type: Bug
> Affects Versions: 1.4.0, 1.4.1
> Reporter: Andrew Purtell
> Assignee: Andrew Purtell
> Priority: Blocker
> Fix For: 1.4.2
>
>
> Port assignments for master ports in site configuration appear to be ignored.
> We are not catching this in tests because there appears to be no positive
> test for port assignment and the only fixed information we require is the
> zookeeper quorum and client port.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)