remove extraneous CreateIndexRequest context in ShrinkAction (#32893)

This commit is contained in:
Tal Levy 2018-08-15 21:55:18 -07:00 committed by GitHub
parent 33522d4fb4
commit 9406aa5af9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -5,7 +5,6 @@
*/
package org.elasticsearch.xpack.core.indexlifecycle;
import org.elasticsearch.action.admin.indices.create.CreateIndexRequest;
import org.elasticsearch.client.Client;
import org.elasticsearch.common.ParseField;
import org.elasticsearch.common.Strings;
@ -29,7 +28,7 @@ public class ShrinkAction implements LifecycleAction {
public static final String SHRUNKEN_INDEX_PREFIX = "shrink-";
public static final ParseField NUMBER_OF_SHARDS_FIELD = new ParseField("number_of_shards");
private static final ConstructingObjectParser<ShrinkAction, CreateIndexRequest> PARSER =
private static final ConstructingObjectParser<ShrinkAction, Void> PARSER =
new ConstructingObjectParser<>(NAME, a -> new ShrinkAction((Integer) a[0]));
static {
@ -39,7 +38,7 @@ public class ShrinkAction implements LifecycleAction {
private int numberOfShards;
public static ShrinkAction parse(XContentParser parser) throws IOException {
return PARSER.parse(parser, new CreateIndexRequest());
return PARSER.parse(parser, null);
}
public ShrinkAction(int numberOfShards) {