mirror of https://github.com/apache/lucene.git
add shardId to create cmd
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1244212 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a06f3a8550
commit
fe0c6ae0ae
|
@ -52,6 +52,7 @@ public class CoreAdminRequest extends SolrRequest
|
|||
protected String dataDir = null;
|
||||
protected String collection;
|
||||
private Integer numShards;
|
||||
private String shardId;
|
||||
|
||||
public Create() {
|
||||
action = CoreAdminAction.CREATE;
|
||||
|
@ -63,12 +64,14 @@ public class CoreAdminRequest extends SolrRequest
|
|||
public void setDataDir(String dataDir) { this.dataDir = dataDir; }
|
||||
public void setCollection(String collection) { this.collection = collection; }
|
||||
public void setNumShards(int numShards) {this.numShards = numShards;}
|
||||
public void setShardId(String shardId) {this.shardId = shardId;}
|
||||
|
||||
public String getInstanceDir() { return instanceDir; }
|
||||
public String getSchemaName() { return schemaName; }
|
||||
public String getConfigName() { return configName; }
|
||||
public String getDataDir() { return dataDir; }
|
||||
public String getCollection() { return collection; }
|
||||
public String getShardId() { return shardId; }
|
||||
|
||||
@Override
|
||||
public SolrParams getParams() {
|
||||
|
@ -98,6 +101,9 @@ public class CoreAdminRequest extends SolrRequest
|
|||
if (numShards != null) {
|
||||
params.set( ZkStateReader.NUM_SHARDS_PROP, numShards);
|
||||
}
|
||||
if (shardId != null) {
|
||||
params.set( ZkStateReader.SHARD_ID_PROP, shardId);
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue