SOLR-9634: Remove deprecated methods

This commit is contained in:
Alan Woodward 2016-10-18 12:03:42 +01:00
parent 67f3f433e2
commit b2188f4958
2 changed files with 3 additions and 73 deletions

View File

@ -41,6 +41,9 @@ Upgrading from Solr 6.x
* Query time join with scoring {!join score=none} (even none) doesn't handle single value numeric fields.
Users are advised to convert these fields into string and reindex.
* Deprecated collection and configset methods on MiniSolrCloudCluster have been
removed
Bug Fixes
----------------------
* SOLR-9262: Connection and read timeouts are being ignored by UpdateShardHandler after SOLR-4509.

View File

@ -17,7 +17,6 @@
package org.apache.solr.cloud;
import javax.servlet.Filter;
import java.io.File;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.nio.charset.Charset;
@ -27,7 +26,6 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Random;
import java.util.SortedMap;
@ -40,24 +38,17 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import com.google.common.base.Charsets;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.embedded.JettyConfig;
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
import org.apache.solr.client.solrj.embedded.SSLConfig;
import org.apache.solr.client.solrj.impl.CloudSolrClient;
import org.apache.solr.client.solrj.impl.CloudSolrClient.Builder;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.client.solrj.request.QueryRequest;
import org.apache.solr.common.cloud.Replica;
import org.apache.solr.common.cloud.SolrZkClient;
import org.apache.solr.common.cloud.ZkConfigManager;
import org.apache.solr.common.cloud.ZkStateReader;
import org.apache.solr.common.params.CollectionParams.CollectionAction;
import org.apache.solr.common.params.CommonAdminParams;
import org.apache.solr.common.params.CoreAdminParams;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.common.util.ExecutorUtil;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.common.util.SolrjNamedThreadFactory;
import org.apache.solr.core.CoreContainer;
import org.apache.zookeeper.KeeperException;
@ -394,14 +385,6 @@ public class MiniSolrCloudCluster {
return jetty;
}
/**
* @deprecated Use {@link #uploadConfigSet(Path, String)}
*/
@Deprecated
public void uploadConfigDir(File configDir, String configName) throws IOException, KeeperException, InterruptedException {
uploadConfigSet(configDir.toPath(), configName);
}
/**
* Upload a config set
* @param configDir a path to the config set to upload
@ -424,62 +407,6 @@ public class MiniSolrCloudCluster {
}
}
/**
* @deprecated Use {@link CollectionAdminRequest#createCollection(String, String, int, int)}
*/
@Deprecated
public NamedList<Object> createCollection(String name, int numShards, int replicationFactor,
String configName, Map<String, String> collectionProperties) throws SolrServerException, IOException {
return createCollection(name, numShards, replicationFactor, configName, null, null, collectionProperties);
}
/**
* @deprecated Use {@link CollectionAdminRequest#createCollection(String, String, int, int)}
*/
@Deprecated
public NamedList<Object> createCollection(String name, int numShards, int replicationFactor,
String configName, String createNodeSet, String asyncId, Map<String, String> collectionProperties) throws SolrServerException, IOException {
final ModifiableSolrParams params = new ModifiableSolrParams();
params.set(CoreAdminParams.ACTION, CollectionAction.CREATE.name());
params.set(CoreAdminParams.NAME, name);
params.set("numShards", numShards);
params.set("replicationFactor", replicationFactor);
params.set("collection.configName", configName);
if (null != createNodeSet) {
params.set(OverseerCollectionMessageHandler.CREATE_NODE_SET, createNodeSet);
}
if (null != asyncId) {
params.set(CommonAdminParams.ASYNC, asyncId);
}
if(collectionProperties != null) {
for(Map.Entry<String, String> property : collectionProperties.entrySet()){
params.set(CoreAdminParams.PROPERTY_PREFIX + property.getKey(), property.getValue());
}
}
return makeCollectionsRequest(params);
}
/**
* @deprecated use {@link CollectionAdminRequest#deleteCollection(String)}
*/
@Deprecated
public NamedList<Object> deleteCollection(String name) throws SolrServerException, IOException {
final ModifiableSolrParams params = new ModifiableSolrParams();
params.set(CoreAdminParams.ACTION, CollectionAction.DELETE.name());
params.set(CoreAdminParams.NAME, name);
return makeCollectionsRequest(params);
}
private NamedList<Object> makeCollectionsRequest(final ModifiableSolrParams params) throws SolrServerException, IOException {
final QueryRequest request = new QueryRequest(params);
request.setPath("/admin/collections");
return solrClient.request(request);
}
/**
* Shut down the cluster, including all Solr nodes and ZooKeeper
*/