[
https://issues.apache.org/jira/browse/HBASE-6677?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
stack updated HBASE-6677:
-------------------------
Resolution: Fixed
Fix Version/s: 0.96.0
Assignee: liang xie
Hadoop Flags: Reviewed
Status: Resolved (was: Patch Available)
Committed to trunk. Looks good. Keeps us in the dynamic port range. Thanks
for the patch Liang.
> Random ZooKeeper port in test can overrun max port
> --------------------------------------------------
>
> Key: HBASE-6677
> URL: https://issues.apache.org/jira/browse/HBASE-6677
> Project: HBase
> Issue Type: Bug
> Components: test
> Affects Versions: 0.96.0
> Reporter: Gregory Chanan
> Assignee: liang xie
> Priority: Trivial
> Labels: noob
> Fix For: 0.96.0
>
> Attachments: HBASE-6677.patch
>
>
> {code}
> while (true) {
> try {
> standaloneServerFactory = new NIOServerCnxnFactory();
> standaloneServerFactory.configure(
> new InetSocketAddress(tentativePort),
> configuration.getInt(HConstants.ZOOKEEPER_MAX_CLIENT_CNXNS,
> 1000));
> } catch (BindException e) {
> LOG.debug("Failed binding ZK Server to client port: " +
> tentativePort);
> // This port is already in use, try to use another.
> tentativePort++;
> continue;
> }
> break;
> }
> {code}
> In the case of failure and all the above ports have already been binded, you
> can extend past the max port. Need to check against a max value.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira