You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/12/12 20:05:14 UTC

[jira] [Commented] (SOLR-6844) Rename ConfigSolr.getZkHostPort(), which actually returns the Solr port, to .getSolrHostPort()

    [ https://issues.apache.org/jira/browse/SOLR-6844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14244624#comment-14244624 ] 

ASF subversion and git services commented on SOLR-6844:
-------------------------------------------------------

Commit 1645034 from [~sarowe@syr.edu] in branch 'dev/trunk'
[ https://svn.apache.org/r1645034 ]

SOLR-6844: Rename ConfigSolr.getZkHostPort(), which actually returns the Solr port, to .getSolrHostPort()

> Rename ConfigSolr.getZkHostPort(), which actually returns the Solr port, to .getSolrHostPort()
> ----------------------------------------------------------------------------------------------
>
>                 Key: SOLR-6844
>                 URL: https://issues.apache.org/jira/browse/SOLR-6844
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Steve Rowe
>            Assignee: Steve Rowe
>            Priority: Minor
>         Attachments: SOLR-6844.patch
>
>
> [~makuk66] pointed out to me that it was suspicious that {{ConfigSolr.getZkHostPort()}} returns {{CfgProp.SOLR_HOSTPORT}}: the method claims to report the configured Zookeeper port, while it in fact returns the configured Solr port.
> The only place this method is called (outside of tests) is in {{ZkContainer.initZookeeper()}} when constructing a {{SolrZkServer}} instance: the value of {{ConfigSolr.getZkHostPort()}} is passed in for the {{solrPort}} param, which is stored by the ctor as the same-named instance variable, which is used in only one place: {{SolrZkServer.parseConfig()}}, where the default value of the ZK port is set as the Solr port + 1000: 
> {code:java}
> props = SolrZkServerProps.getProperties(confHome + '/' + "zoo.cfg");
> SolrZkServerProps.injectServers(props, zkRun, zkHost);
> zkProps.parseProperties(props);
> if (zkProps.getClientPortAddress() == null) {
>   zkProps.setClientPort(Integer.parseInt(solrPort)+1000);
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org