[ML] Specify ML_ORIGIN when calling the job update endpoint internally (elastic/x-pack-elasticsearch#3110)

This change applies the same pattern that was applied in elastic/x-pack-elasticsearch#3054 to a new
method that was introduced in elastic/x-pack-elasticsearch#2975 which was in-flight at the same time
so missed the original batch of changes.

relates elastic/x-pack-elasticsearch#3109

Original commit: elastic/x-pack-elasticsearch@8076c6cf6a
This commit is contained in:
David Roberts 2017-11-27 09:18:24 +00:00 committed by GitHub
parent c777c1d36f
commit 304330e1bc
1 changed files with 1 additions and 1 deletions

View File

@ -324,7 +324,7 @@ public class AutoDetectResultProcessor {
.setEstablishedModelMemory(establishedModelMemory).build(); .setEstablishedModelMemory(establishedModelMemory).build();
UpdateJobAction.Request updateRequest = new UpdateJobAction.Request(jobId, update); UpdateJobAction.Request updateRequest = new UpdateJobAction.Request(jobId, update);
client.execute(UpdateJobAction.INSTANCE, updateRequest, new ActionListener<PutJobAction.Response>() { executeAsyncWithOrigin(client, ML_ORIGIN, UpdateJobAction.INSTANCE, updateRequest, new ActionListener<PutJobAction.Response>() {
@Override @Override
public void onResponse(PutJobAction.Response response) { public void onResponse(PutJobAction.Response response) {
latestEstablishedModelMemory = establishedModelMemory; latestEstablishedModelMemory = establishedModelMemory;