Stop Datafeed API
editStop Datafeed API
editThe Stop Datafeed API provides the ability to stop a machine learning datafeed in the cluster.
It accepts a StopDatafeedRequest object and responds
with a StopDatafeedResponse object.
Stop Datafeed Request
editA StopDatafeedRequest object is created referencing any number of non-null datafeedId entries.
Wildcards and _all are also accepted.
All other fields are optional for the request.
Optional Arguments
editThe following arguments are optional.
Synchronous Execution
editWhen executing a StopDatafeedRequest in the following manner, the client waits
for the StopDatafeedResponse to be returned before continuing with code execution:
StopDatafeedResponse response = client.machineLearning().stopDatafeed(request, RequestOptions.DEFAULT);
Asynchronous Execution
editExecuting a StopDatafeedRequest can also be done in an asynchronous fashion so that
the client can return directly. Users need to specify how the response or
potential failures will be handled by passing the request and a listener to the
asynchronous stop-datafeed method:
The asynchronous method does not block and returns immediately. Once it is
completed the ActionListener is called back using the onResponse method
if the execution successfully completed or using the onFailure method if
it failed.
A typical listener for stop-datafeed looks like: