mirror of https://github.com/apache/lucene.git
SOLR-6844: Rename ConfigSolr.getZkHostPort(), which actually returns the Solr port, to .getSolrHostPort()
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1645034 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3a5438ec1f
commit
980c23f498
|
@ -487,6 +487,9 @@ Other Changes
|
|||
* SOLR-6843: JMX RMI connector should be disabled by default but can be activated by
|
||||
setting ENABLE_REMOTE_JMX_OPTS to true in solr.in.(sh|cmd). (Timothy Potter)
|
||||
|
||||
* SOLR-6844: Rename ConfigSolr.getZkHostPort(), which actually returns the Solr port,
|
||||
to .getSolrHostPort(). (Martijn Koster, Steve Rowe)
|
||||
|
||||
================== 4.10.3 ==================
|
||||
|
||||
Bug Fixes
|
||||
|
|
|
@ -141,7 +141,7 @@ public abstract class ConfigSolr {
|
|||
|
||||
protected static final String DEFAULT_CORE_ADMIN_PATH = "/admin/cores";
|
||||
|
||||
public String getZkHostPort() {
|
||||
public String getSolrHostPort() {
|
||||
return get(CfgProp.SOLR_HOSTPORT, null);
|
||||
}
|
||||
|
||||
|
|
|
@ -62,11 +62,11 @@ public class ZkContainer {
|
|||
}
|
||||
|
||||
initZooKeeper(cc, solrHome,
|
||||
config.getZkHost(), config.getZkClientTimeout(), config.getZkHostPort(), config.getZkHostContext(),
|
||||
config.getZkHost(), config.getZkClientTimeout(), config.getSolrHostPort(), config.getZkHostContext(),
|
||||
config.getHost(), config.getLeaderVoteWait(), config.getLeaderConflictResolveWait(), config.getGenericCoreNodeNames());
|
||||
}
|
||||
|
||||
public void initZooKeeper(final CoreContainer cc, String solrHome, String zkHost, int zkClientTimeout, String hostPort,
|
||||
public void initZooKeeper(final CoreContainer cc, String solrHome, String zkHost, int zkClientTimeout, String solrHostPort,
|
||||
String hostContext, String host, int leaderVoteWait, int leaderConflictResolveWait, boolean genericCoreNodeNames) {
|
||||
|
||||
ZkController zkController = null;
|
||||
|
@ -84,7 +84,7 @@ public class ZkContainer {
|
|||
if (zkRun == null && zookeeperHost == null)
|
||||
return; // not in zk mode
|
||||
|
||||
if (null == hostPort) {
|
||||
if (null == solrHostPort) {
|
||||
throw new ZooKeeperException(SolrException.ErrorCode.SERVER_ERROR,
|
||||
"'hostPort' must be configured to run SolrCloud");
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ public class ZkContainer {
|
|||
if (zkRun != null) {
|
||||
String zkDataHome = System.getProperty("zkServerDataDir", solrHome + "zoo_data");
|
||||
String zkConfHome = System.getProperty("zkServerConfDir", solrHome);
|
||||
zkServer = new SolrZkServer(stripChroot(zkRun), stripChroot(zookeeperHost), zkDataHome, zkConfHome, hostPort);
|
||||
zkServer = new SolrZkServer(stripChroot(zkRun), stripChroot(zookeeperHost), zkDataHome, zkConfHome, solrHostPort);
|
||||
zkServer.parseConfig();
|
||||
zkServer.start();
|
||||
|
||||
|
@ -132,7 +132,7 @@ public class ZkContainer {
|
|||
"A chroot was specified in ZkHost but the znode doesn't exist. " + zookeeperHost);
|
||||
}
|
||||
zkController = new ZkController(cc, zookeeperHost, zkClientTimeout,
|
||||
zkClientConnectTimeout, host, hostPort, hostContext,
|
||||
zkClientConnectTimeout, host, solrHostPort, hostContext,
|
||||
leaderVoteWait, leaderConflictResolveWait, genericCoreNodeNames,
|
||||
new CurrentCoreDescriptorProvider() {
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ public class SolrXmlInZkTest extends SolrTestCaseJ4 {
|
|||
try {
|
||||
setUpZkAndDiskXml(true, true);
|
||||
assertEquals("Should have gotten a new port the xml file sent to ZK, overrides the copy on disk",
|
||||
cfg.getZkHostPort(), "9045");
|
||||
cfg.getSolrHostPort(), "9045");
|
||||
} finally {
|
||||
closeZK();
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ public class SolrXmlInZkTest extends SolrTestCaseJ4 {
|
|||
try {
|
||||
setUpZkAndDiskXml(true, false);
|
||||
assertEquals("Should have gotten a new port the xml file sent to ZK",
|
||||
cfg.getZkHostPort(), "9045");
|
||||
cfg.getSolrHostPort(), "9045");
|
||||
} finally {
|
||||
closeZK();
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ public class SolrXmlInZkTest extends SolrTestCaseJ4 {
|
|||
try {
|
||||
System.clearProperty("solr.solrxml.location");
|
||||
setUpZkAndDiskXml(false, true);
|
||||
assertEquals("Should have gotten the default port", cfg.getZkHostPort(), "8983");
|
||||
assertEquals("Should have gotten the default port", cfg.getSolrHostPort(), "8983");
|
||||
} finally {
|
||||
closeZK();
|
||||
}
|
||||
|
|
|
@ -19,11 +19,9 @@ package org.apache.solr.core;
|
|||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Random;
|
||||
import java.util.Locale;
|
||||
|
||||
import com.carrotsearch.randomizedtesting.rules.SystemPropertiesRestoreRule;
|
||||
import com.google.common.base.Charsets;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.lucene.util.TestUtil;
|
||||
import org.apache.solr.SolrTestCaseJ4;
|
||||
|
@ -76,7 +74,7 @@ public class TestSolrXml extends SolrTestCaseJ4 {
|
|||
assertEquals("max update conn/host", 37, cfg.getMaxUpdateConnectionsPerHost());
|
||||
assertEquals("host", "testHost", cfg.getHost());
|
||||
assertEquals("zk host context", "testHostContext", cfg.getZkHostContext());
|
||||
assertEquals("zk host port", "44", cfg.getZkHostPort());
|
||||
assertEquals("solr host port", "44", cfg.getSolrHostPort());
|
||||
assertEquals("leader vote wait", 55, cfg.getLeaderVoteWait());
|
||||
assertEquals("logging class", "testLoggingClass", cfg.getLogWatcherConfig().getLoggingClass());
|
||||
assertEquals("log watcher", true, cfg.getLogWatcherConfig().isEnabled());
|
||||
|
@ -106,7 +104,7 @@ public class TestSolrXml extends SolrTestCaseJ4 {
|
|||
|
||||
ConfigSolr cfg = ConfigSolr.fromSolrHome(loader, solrHome.getAbsolutePath());
|
||||
assertEquals("core root dir", "myCoreRoot" + File.separator, cfg.getCoreRootDirectory());
|
||||
assertEquals("zk host port", "8888", cfg.getZkHostPort());
|
||||
assertEquals("solr host port", "8888", cfg.getSolrHostPort());
|
||||
assertEquals("schema cache", false, cfg.hasSchemaCache());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue