SOLR-1930: remove some SolrConfig deprecations

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1054153 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-12-31 18:08:42 +00:00
parent bb65710fa4
commit 2bf47f6bc7
2 changed files with 1 additions and 64 deletions

View File

@ -71,12 +71,6 @@ public class SolrConfig extends Config {
public static final String DEFAULT_CONF_FILE = "solrconfig.xml";
/**
* Compatibility feature for single-core (pre-solr{215,350} patch); should go away at solr-2.0
* @deprecated Use {@link SolrCore#getSolrConfig()} instead.
*/
@Deprecated
public static SolrConfig config = null;
/**
* Singleton keeping track of configuration errors
@ -177,8 +171,6 @@ public class SolrConfig extends Config {
hashSetInverseLoadFactor = 1.0f / getFloat("//HashDocSet/@loadFactor",0.75f);
hashDocSetMaxSize= getInt("//HashDocSet/@maxSize",3000);
pingQueryParams = readPingQueryParams(this);
httpCachingConfig = new HttpCachingConfig(this);
Node jmx = getNode("jmx", false);
@ -211,17 +203,9 @@ public class SolrConfig extends Config {
loadPluginInfo(IndexReaderFactory.class,"indexReaderFactory",false, true);
loadPluginInfo(UpdateRequestProcessorChain.class,"updateRequestProcessorChain",false, false);
//TODO deprecated remove it later
loadPluginInfo(SolrHighlighter.class,"highlighting",false, false);
if( pluginStore.containsKey( SolrHighlighter.class.getName() ) )
log.warn( "Deprecated syntax found. <highlighting/> should move to <searchComponent/>" );
updateHandlerInfo = loadUpdatehandlerInfo();
Config.log.info("Loaded SolrConfig: " + name);
// TODO -- at solr 2.0. this should go away
config = this;
}
protected UpdateHandlerInfo loadUpdatehandlerInfo() {
@ -289,59 +273,12 @@ public class SolrConfig extends Config {
return httpCachingConfig;
}
/**
* ping query request parameters
* @deprecated Use {@link PingRequestHandler} instead.
*/
@Deprecated
private final NamedList pingQueryParams;
static private NamedList readPingQueryParams(SolrConfig config) {
String urlSnippet = config.get("admin/pingQuery", "").trim();
StringTokenizer qtokens = new StringTokenizer(urlSnippet,"&");
String tok;
NamedList params = new NamedList();
while (qtokens.hasMoreTokens()) {
tok = qtokens.nextToken();
String[] split = tok.split("=", 2);
params.add(split[0], split[1]);
}
if (0 < params.size()) {
log.warn("The <pingQuery> syntax is deprecated, " +
"please use PingRequestHandler instead");
}
return params;
}
/**
* Returns a Request object based on the admin/pingQuery section
* of the Solr config file.
*
* @deprecated use {@link PingRequestHandler} instead
*/
@Deprecated
public SolrQueryRequest getPingQueryRequest(SolrCore core) {
if(pingQueryParams.size() == 0) {
throw new IllegalStateException
("<pingQuery> not configured (consider registering " +
"PingRequestHandler with the name '/admin/ping' instead)");
}
return new LocalSolrQueryRequest(core, pingQueryParams);
}
public static class JmxConfiguration {
public boolean enabled = false;
public String agentId;
public String serviceUrl;
public String rootName;
@Deprecated
public JmxConfiguration(boolean enabled,
String agentId,
String serviceUrl) {
this(enabled,agentId,serviceUrl,null);
}
public JmxConfiguration(boolean enabled,
String agentId,
String serviceUrl,

View File

@ -70,7 +70,7 @@ public class TestJmxMonitoredMap extends LuceneTestCase {
throw e;
}
String url = "service:jmx:rmi:///jndi/rmi://:" + port + "/solrjmx";
JmxConfiguration config = new JmxConfiguration(true, null, url);
JmxConfiguration config = new JmxConfiguration(true, null, url, null);
monitoredMap = new JmxMonitoredMap<String, SolrInfoMBean>(null, config);
JMXServiceURL u = new JMXServiceURL(url);
connector = JMXConnectorFactory.connect(u);