if (atts.containsKey(ROUTER_NAME)) create.setRouterName(atts.remove(ROUTER_NAME)); if (atts.containsKey(ROUTER_FIELD)) create.setRouterField(atts.remove(ROUTER_FIELD)); if (atts.containsKey(SHARDS)) create.setShards(atts.remove(SHARDS)); if (atts.containsKey(MAX_SHARDS_PER_NODE)) { String m = atts.remove(MAX_SHARDS_PER_NODE);
private Create(String collection, String config, String routerName, Integer numShards, String shards, Integer numNrtReplicas, Integer numTlogReplicas, Integer numPullReplicas) { super(CollectionAction.CREATE, SolrIdentifierValidator.validateCollectionName(collection)); // NOTE: there's very little we can assert about the args because nothing but "collection" is required by the server if ((null != shards) && (null != numShards)) { throw new IllegalArgumentException("Can not specify both a numShards and a list of shards"); } this.configName = config; this.routerName = routerName; this.numShards = numShards; this.setShards(shards); this.nrtReplicas = numNrtReplicas; this.tlogReplicas = numTlogReplicas; this.pullReplicas = numPullReplicas; }