Skip to content

Commit

Permalink
Remove unused internal waitForAck field from UpdateJobAction
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkyle committed Oct 3, 2018
1 parent d0da950 commit e647611
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public static UpdateJobAction.Request parseRequest(String jobId, XContentParser

/** Indicates an update that was not triggered by a user */
private boolean isInternal;
private boolean waitForAck = true;

public Request(String jobId, JobUpdate update) {
this(jobId, update, false);
Expand Down Expand Up @@ -88,14 +87,6 @@ public boolean isInternal() {
return isInternal;
}

public boolean isWaitForAck() {
return waitForAck;
}

public void setWaitForAck(boolean waitForAck) {
this.waitForAck = waitForAck;
}

@Override
public ActionRequestValidationException validate() {
return null;
Expand All @@ -111,11 +102,6 @@ public void readFrom(StreamInput in) throws IOException {
} else {
isInternal = false;
}
if (in.getVersion().onOrAfter(Version.V_6_3_0)) {
waitForAck = in.readBoolean();
} else {
waitForAck = true;
}
}

@Override
Expand All @@ -126,9 +112,6 @@ public void writeTo(StreamOutput out) throws IOException {
if (out.getVersion().onOrAfter(Version.V_6_2_2)) {
out.writeBoolean(isInternal);
}
if (out.getVersion().onOrAfter(Version.V_6_3_0)) {
out.writeBoolean(waitForAck);
}
}

@Override
Expand All @@ -144,8 +127,7 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) return false;
UpdateJobAction.Request that = (UpdateJobAction.Request) o;
return Objects.equals(jobId, that.jobId) &&
Objects.equals(update, that.update) &&
isInternal == that.isInternal;
Objects.equals(update, that.update);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ protected UpdateJobAction.Request createTestInstance() {
JobUpdate.Builder jobUpdate = new JobUpdate.Builder(jobId);
jobUpdate.setAnalysisLimits(new AnalysisLimits(100L, 100L));
UpdateJobAction.Request request = new UpdateJobAction.Request(jobId, jobUpdate.build());
request.setWaitForAck(randomBoolean());
return request;
}

Expand Down

0 comments on commit e647611

Please sign in to comment.