public CollectionAdminRequest(String path, CollectionAction action) { super(METHOD.GET, path); this.action = checkNotNull(CoreAdminParams.ACTION, action); }
/** * Returns a SolrRequest to delete a replica from a shard in a collection */ public static DeleteReplica deleteReplica(String collection, String shard, String replica) { return new DeleteReplica(collection, checkNotNull(CoreAdminParams.SHARD, shard), checkNotNull(CoreAdminParams.REPLICA, replica)); }
/** * Returns a SolrRequest to remove a number of replicas from a specific shard */ public static DeleteReplica deleteReplicasFromShard(String collection, String shard, int count) { return new DeleteReplica(collection, checkNotNull(CoreAdminParams.SHARD, shard), count); }
/** * Returns a SolrRequest to add a replica to a collection using a route key */ public static AddReplica addReplicaByRouteKey(String collection, String routeKey) { return new AddReplica(collection, null, checkNotNull("routeKey",routeKey), null); }
/** * Returns a SolrRequest to delete an asynchronous request status */ public static DeleteStatus deleteAsyncId(String requestId) { return new DeleteStatus(checkNotNull("requestId", requestId), null); }
/** * Returns a SolrRequest for creating a collection with the implicit router and specific types of replicas * @param collection the collection name * @param config the collection config * @param shards a shard definition string * @param numNrtReplicas the number of replicas of type {@link org.apache.solr.common.cloud.Replica.Type#NRT} * @param numTlogReplicas the number of replicas of type {@link org.apache.solr.common.cloud.Replica.Type#TLOG} * @param numPullReplicas the number of replicas of type {@link org.apache.solr.common.cloud.Replica.Type#PULL} */ public static Create createCollectionWithImplicitRouter(String collection, String config, String shards, int numNrtReplicas, int numTlogReplicas, int numPullReplicas) { return new Create(collection, config, ImplicitDocRouter.NAME, null, checkNotNull("shards",shards), numNrtReplicas, numTlogReplicas, numPullReplicas); }
/** * Returns a SolrRequest to add a replica of the specified type to a shard in a collection. * If the replica type is null, the server default will be used. * */ public static AddReplica addReplicaToShard(String collection, String shard, Replica.Type replicaType) { return new AddReplica(collection, checkNotNull(CoreAdminParams.SHARD, shard), null, replicaType); }
public static DeleteReplica deleteReplica(String collection, String shard, int count) { return new DeleteReplica(collection, checkNotNull(CoreAdminParams.SHARD, shard), count); }