SOLR-4622: Hardcoded SolrCloud defaults for hostContext and hostPort that were deprecated in 4.3 have been removed completely.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1480160 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris M. Hostetter 2013-05-08 04:52:38 +00:00
parent 3ffb10b13e
commit a039f476c8
4 changed files with 14 additions and 20 deletions

View File

@ -38,6 +38,12 @@ TBD...
Detailed Change List
----------------------
Other Changes
----------------------
* SOLR-4622: Hardcoded SolrCloud defaults for hostContext and hostPort that
were deprecated in 4.3 have been removed completely. (hossman)
================== 4.4.0 ==================
Versions of Major Components

View File

@ -1113,12 +1113,12 @@ public class CoreContainer
coresAttribs.put("defaultCoreName", defaultCoreName);
}
addCoresAttrib(coresAttribs, ConfigSolr.CfgProp.SOLR_HOSTPORT, "hostPort",zkSys.getHostPort(), ZkContainer.DEFAULT_HOST_PORT);
addCoresAttrib(coresAttribs, ConfigSolr.CfgProp.SOLR_HOSTPORT, "hostPort",zkSys.getHostPort(), null);
addCoresAttrib(coresAttribs, ConfigSolr.CfgProp.SOLR_ZKCLIENTTIMEOUT, "zkClientTimeout",
intToString(this.zkClientTimeout),
Integer.toString(DEFAULT_ZK_CLIENT_TIMEOUT));
addCoresAttrib(coresAttribs, ConfigSolr.CfgProp.SOLR_HOSTCONTEXT, "hostContext",
zkSys.getHostContext(), ZkContainer.DEFAULT_HOST_CONTEXT);
zkSys.getHostContext(), null);
addCoresAttrib(coresAttribs, ConfigSolr.CfgProp.SOLR_LEADERVOTEWAIT, "leaderVoteWait",
zkSys.getLeaderVoteWait(), LEADER_VOTE_WAIT);
addCoresAttrib(coresAttribs, ConfigSolr.CfgProp.SOLR_CORELOADTHREADS, "coreLoadThreads",

View File

@ -43,11 +43,6 @@ import org.xml.sax.InputSource;
public class ZkContainer {
protected static Logger log = LoggerFactory.getLogger(ZkContainer.class);
/** @deprecated will be remove in Solr 5.0 (SOLR-4622) */
public static final String DEFAULT_HOST_CONTEXT = "solr";
/** @deprecated will be remove in Solr 5.0 (SOLR-4622) */
public static final String DEFAULT_HOST_PORT = "8983";
protected ZkController zkController;
private SolrZkServer zkServer;
private int zkClientTimeout;
@ -119,21 +114,14 @@ public class ZkContainer {
if (zkRun == null && zookeeperHost == null)
return; // not in zk mode
// BEGIN: SOLR-4622: deprecated hardcoded defaults for hostPort & hostContext
if (null == hostPort) {
// throw new ZooKeeperException(SolrException.ErrorCode.SERVER_ERROR,
// "'hostPort' must be configured to run SolrCloud");
log.warn("Solr 'hostPort' has not be explicitly configured, using hardcoded default of " + DEFAULT_HOST_PORT + ". This default has been deprecated and will be removed in future versions of Solr, please configure this value explicitly");
hostPort = DEFAULT_HOST_PORT;
throw new ZooKeeperException(SolrException.ErrorCode.SERVER_ERROR,
"'hostPort' must be configured to run SolrCloud");
}
if (null == hostContext) {
// throw new ZooKeeperException(SolrException.ErrorCode.SERVER_ERROR,
// "'hostContext' must be configured to run SolrCloud");
log.warn("Solr 'hostContext' has not be explicitly configured, using hardcoded default of " + DEFAULT_HOST_CONTEXT + ". This default has been deprecated and will be removed in future versions of Solr, please configure this value explicitly");
hostContext = DEFAULT_HOST_CONTEXT;
throw new ZooKeeperException(SolrException.ErrorCode.SERVER_ERROR,
"'hostContext' must be configured to run SolrCloud");
}
// END: SOLR-4622
// zookeeper in quorum mode currently causes a failure when trying to
// register log4j mbeans. See SOLR-2369

View File

@ -183,8 +183,8 @@ public class TestHarness extends BaseTestHarness {
String solrHome = SolrResourceLoader.locateSolrHome();
container = new CoreContainer(new SolrResourceLoader(solrHome)) {
{
String hostPort = System.getProperty("hostPort");
String hostContext = "solr";
String hostPort = System.getProperty("hostPort", "8983");
String hostContext = System.getProperty("hostContext", "solr");
defaultCoreName = CoreContainer.DEFAULT_DEFAULT_CORE_NAME;
initShardHandler();
zkSys.initZooKeeper(this, solrHome, System.getProperty("zkHost"), 30000, hostPort, hostContext, null, "30000", 30000, 30000);