[ML] Removed workaround that task status named writable needed to have the same name as action name.

Original commit: elastic/x-pack-elasticsearch@99d9d80073
This commit is contained in:
Martijn van Groningen 2017-02-24 14:32:53 +01:00
parent cd4e543479
commit 2c5e32f3d3
2 changed files with 2 additions and 4 deletions

View File

@ -12,7 +12,6 @@ import org.elasticsearch.common.xcontent.ConstructingObjectParser;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.tasks.Task;
import org.elasticsearch.xpack.ml.action.StartDatafeedAction;
import java.io.IOException;
import java.util.Locale;
@ -23,7 +22,7 @@ public enum DatafeedState implements Task.Status {
STARTED, STOPPED;
public static final String NAME = StartDatafeedAction.NAME;//"DatafeedState";
public static final String NAME = "DatafeedState";
private static final ConstructingObjectParser<DatafeedState, Void> PARSER =
new ConstructingObjectParser<>(NAME, args -> fromString((String) args[0]));

View File

@ -12,7 +12,6 @@ import org.elasticsearch.common.xcontent.ConstructingObjectParser;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.tasks.Task;
import org.elasticsearch.xpack.ml.action.OpenJobAction;
import java.io.IOException;
import java.util.Arrays;
@ -29,7 +28,7 @@ public enum JobState implements Task.Status {
CLOSING, CLOSED, OPENING, OPENED, FAILED;
public static final String NAME = OpenJobAction.NAME;//"JobState";
public static final String NAME = "JobState";
private static final ConstructingObjectParser<JobState, Void> PARSER =
new ConstructingObjectParser<>(NAME, args -> fromString((String) args[0]));