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 dataDir = null;
|
||||||
protected String collection;
|
protected String collection;
|
||||||
private Integer numShards;
|
private Integer numShards;
|
||||||
|
private String shardId;
|
||||||
|
|
||||||
public Create() {
|
public Create() {
|
||||||
action = CoreAdminAction.CREATE;
|
action = CoreAdminAction.CREATE;
|
||||||
|
@ -63,12 +64,14 @@ public class CoreAdminRequest extends SolrRequest
|
||||||
public void setDataDir(String dataDir) { this.dataDir = dataDir; }
|
public void setDataDir(String dataDir) { this.dataDir = dataDir; }
|
||||||
public void setCollection(String collection) { this.collection = collection; }
|
public void setCollection(String collection) { this.collection = collection; }
|
||||||
public void setNumShards(int numShards) {this.numShards = numShards;}
|
public void setNumShards(int numShards) {this.numShards = numShards;}
|
||||||
|
public void setShardId(String shardId) {this.shardId = shardId;}
|
||||||
|
|
||||||
public String getInstanceDir() { return instanceDir; }
|
public String getInstanceDir() { return instanceDir; }
|
||||||
public String getSchemaName() { return schemaName; }
|
public String getSchemaName() { return schemaName; }
|
||||||
public String getConfigName() { return configName; }
|
public String getConfigName() { return configName; }
|
||||||
public String getDataDir() { return dataDir; }
|
public String getDataDir() { return dataDir; }
|
||||||
public String getCollection() { return collection; }
|
public String getCollection() { return collection; }
|
||||||
|
public String getShardId() { return shardId; }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SolrParams getParams() {
|
public SolrParams getParams() {
|
||||||
|
@ -98,6 +101,9 @@ public class CoreAdminRequest extends SolrRequest
|
||||||
if (numShards != null) {
|
if (numShards != null) {
|
||||||
params.set( ZkStateReader.NUM_SHARDS_PROP, numShards);
|
params.set( ZkStateReader.NUM_SHARDS_PROP, numShards);
|
||||||
}
|
}
|
||||||
|
if (shardId != null) {
|
||||||
|
params.set( ZkStateReader.SHARD_ID_PROP, shardId);
|
||||||
|
}
|
||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue