mirror of https://github.com/apache/lucene.git
SOLR-5739: Removed shard state, range and parent from CoreAdmin calls and CoreDescriptor
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1569154 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bd527329ff
commit
76e71522a2
|
@ -44,10 +44,7 @@ public class CloudDescriptor {
|
|||
volatile boolean isLeader = false;
|
||||
volatile String lastPublished = ZkStateReader.ACTIVE;
|
||||
|
||||
public static final String SHARD_STATE = "shardState";
|
||||
public static final String NUM_SHARDS = "numShards";
|
||||
public static final String SHARD_RANGE = "shardRange";
|
||||
public static final String SHARD_PARENT = "shardParent";
|
||||
|
||||
public CloudDescriptor(String coreName, Properties props, CoreDescriptor cd) {
|
||||
this.cd = cd;
|
||||
|
@ -56,10 +53,7 @@ public class CloudDescriptor {
|
|||
this.collectionName = props.getProperty(CoreDescriptor.CORE_COLLECTION, coreName);
|
||||
this.roles = props.getProperty(CoreDescriptor.CORE_ROLES, null);
|
||||
this.nodeName = props.getProperty(CoreDescriptor.CORE_NODE_NAME);
|
||||
this.shardState = props.getProperty(CloudDescriptor.SHARD_STATE, Slice.ACTIVE);
|
||||
this.numShards = PropertiesUtil.toInteger(props.getProperty(CloudDescriptor.NUM_SHARDS), null);
|
||||
this.shardRange = props.getProperty(CloudDescriptor.SHARD_RANGE, null);
|
||||
this.shardParent = props.getProperty(CloudDescriptor.SHARD_PARENT, null);
|
||||
}
|
||||
|
||||
public String getLastPublished() {
|
||||
|
@ -125,28 +119,4 @@ public class CloudDescriptor {
|
|||
if(nodeName==null) cd.getPersistableStandardProperties().remove(CoreDescriptor.CORE_NODE_NAME);
|
||||
else cd.getPersistableStandardProperties().setProperty(CoreDescriptor.CORE_NODE_NAME, nodeName);
|
||||
}
|
||||
|
||||
public String getShardRange() {
|
||||
return shardRange;
|
||||
}
|
||||
|
||||
public void setShardRange(String shardRange) {
|
||||
this.shardRange = shardRange;
|
||||
}
|
||||
|
||||
public String getShardState() {
|
||||
return shardState;
|
||||
}
|
||||
|
||||
public void setShardState(String shardState) {
|
||||
this.shardState = shardState;
|
||||
}
|
||||
|
||||
public String getShardParent() {
|
||||
return shardParent;
|
||||
}
|
||||
|
||||
public void setShardParent(String shardParent) {
|
||||
this.shardParent = shardParent;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -966,9 +966,6 @@ public class OverseerCollectionProcessor implements Runnable, ClosableThread {
|
|||
params.set(CoreAdminParams.NAME, subShardName);
|
||||
params.set(CoreAdminParams.COLLECTION, collectionName);
|
||||
params.set(CoreAdminParams.SHARD, subSlice);
|
||||
params.set(CoreAdminParams.SHARD_RANGE, subRange.toString());
|
||||
params.set(CoreAdminParams.SHARD_STATE, Slice.CONSTRUCTION);
|
||||
params.set(CoreAdminParams.SHARD_PARENT, parentSlice.getName());
|
||||
addPropertyParams(message, params);
|
||||
sendShardRequest(nodeName, params);
|
||||
}
|
||||
|
|
|
@ -1034,9 +1034,6 @@ public final class ZkController {
|
|||
ZkStateReader.ROLES_PROP, cd.getCloudDescriptor().getRoles(),
|
||||
ZkStateReader.NODE_NAME_PROP, getNodeName(),
|
||||
ZkStateReader.SHARD_ID_PROP, cd.getCloudDescriptor().getShardId(),
|
||||
ZkStateReader.SHARD_RANGE_PROP, cd.getCloudDescriptor().getShardRange(),
|
||||
ZkStateReader.SHARD_STATE_PROP, cd.getCloudDescriptor().getShardState(),
|
||||
ZkStateReader.SHARD_PARENT_PROP, cd.getCloudDescriptor().getShardParent(),
|
||||
ZkStateReader.COLLECTION_PROP, cd.getCloudDescriptor()
|
||||
.getCollectionName(),
|
||||
ZkStateReader.NUM_SHARDS_PROP, numShards != null ? numShards.toString()
|
||||
|
|
|
@ -105,8 +105,7 @@ public class CoreDescriptor {
|
|||
CORE_COLLECTION,
|
||||
CORE_ROLES,
|
||||
CORE_NODE_NAME,
|
||||
CloudDescriptor.NUM_SHARDS,
|
||||
CloudDescriptor.SHARD_STATE
|
||||
CloudDescriptor.NUM_SHARDS
|
||||
);
|
||||
|
||||
private final CoreContainer coreContainer;
|
||||
|
|
|
@ -440,9 +440,6 @@ public class CoreAdminHandler extends RequestHandlerBase {
|
|||
.put(CoreAdminParams.COLLECTION, CoreDescriptor.CORE_COLLECTION)
|
||||
.put(CoreAdminParams.ROLES, CoreDescriptor.CORE_ROLES)
|
||||
.put(CoreAdminParams.CORE_NODE_NAME, CoreDescriptor.CORE_NODE_NAME)
|
||||
.put(CoreAdminParams.SHARD_STATE, CloudDescriptor.SHARD_STATE)
|
||||
.put(CoreAdminParams.SHARD_RANGE, CloudDescriptor.SHARD_RANGE)
|
||||
.put(CoreAdminParams.SHARD_PARENT, CloudDescriptor.SHARD_PARENT)
|
||||
.put(ZkStateReader.NUM_SHARDS_PROP, CloudDescriptor.NUM_SHARDS)
|
||||
.build();
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@ import org.apache.solr.common.cloud.ZkNodeProps;
|
|||
import org.apache.solr.common.cloud.ZkStateReader;
|
||||
import org.apache.solr.common.params.CollectionParams;
|
||||
import org.apache.solr.common.params.ModifiableSolrParams;
|
||||
import org.apache.solr.handler.admin.CollectionsHandler;
|
||||
import org.apache.solr.update.DirectUpdateHandler2;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
|
|
Loading…
Reference in New Issue