Audits a message when a data frame analytics job is force stopped. Backport of #60973
This commit is contained in:
parent
c7b0290256
commit
2e18c0f2ac
|
@ -61,6 +61,7 @@ public final class Messages {
|
||||||
public static final String DATA_FRAME_ANALYTICS_AUDIT_UPDATED = "Updated analytics settings: {0}";
|
public static final String DATA_FRAME_ANALYTICS_AUDIT_UPDATED = "Updated analytics settings: {0}";
|
||||||
public static final String DATA_FRAME_ANALYTICS_AUDIT_STARTED = "Started analytics";
|
public static final String DATA_FRAME_ANALYTICS_AUDIT_STARTED = "Started analytics";
|
||||||
public static final String DATA_FRAME_ANALYTICS_AUDIT_STOPPED = "Stopped analytics";
|
public static final String DATA_FRAME_ANALYTICS_AUDIT_STOPPED = "Stopped analytics";
|
||||||
|
public static final String DATA_FRAME_ANALYTICS_AUDIT_FORCE_STOPPED = "Stopped analytics (forced)";
|
||||||
public static final String DATA_FRAME_ANALYTICS_AUDIT_DELETED = "Deleted analytics";
|
public static final String DATA_FRAME_ANALYTICS_AUDIT_DELETED = "Deleted analytics";
|
||||||
public static final String DATA_FRAME_ANALYTICS_AUDIT_UPDATED_STATE_WITH_REASON =
|
public static final String DATA_FRAME_ANALYTICS_AUDIT_UPDATED_STATE_WITH_REASON =
|
||||||
"Updated analytics task state to [{0}] with reason [{1}]";
|
"Updated analytics task state to [{0}] with reason [{1}]";
|
||||||
|
|
|
@ -217,6 +217,7 @@ public class TransportStopDataFrameAnalyticsAction
|
||||||
if (analyticsTask != null) {
|
if (analyticsTask != null) {
|
||||||
persistentTasksService.sendRemoveRequest(analyticsTask.getId(), ActionListener.wrap(
|
persistentTasksService.sendRemoveRequest(analyticsTask.getId(), ActionListener.wrap(
|
||||||
removedTask -> {
|
removedTask -> {
|
||||||
|
auditor.info(analyticsId, Messages.DATA_FRAME_ANALYTICS_AUDIT_FORCE_STOPPED);
|
||||||
if (counter.incrementAndGet() == nonStoppedAnalytics.size()) {
|
if (counter.incrementAndGet() == nonStoppedAnalytics.size()) {
|
||||||
sendResponseOrFailure(request.getId(), listener, failures);
|
sendResponseOrFailure(request.getId(), listener, failures);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue