Class MachineLearningClient
- java.lang.Object
-
- org.elasticsearch.client.MachineLearningClient
-
public final class MachineLearningClient extends java.lang.Object
Machine Learning API client wrapper for theRestHighLevelClient
See the X-Pack Machine Learning APIs for additional information.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CloseJobResponse
closeJob(CloseJobRequest request, RequestOptions options)
Closes one or more Machine Learning Jobs.void
closeJobAsync(CloseJobRequest request, RequestOptions options, ActionListener<CloseJobResponse> listener)
Closes one or more Machine Learning Jobs asynchronously, notifies listener on completion A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results.AcknowledgedResponse
deleteCalendar(DeleteCalendarRequest request, RequestOptions options)
Deletes the given Machine Learning Calendarvoid
deleteCalendarAsync(DeleteCalendarRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Deletes the given Machine Learning Job asynchronously and notifies the listener on completionAcknowledgedResponse
deleteDatafeed(DeleteDatafeedRequest request, RequestOptions options)
Deletes the given Machine Learning Datafeedvoid
deleteDatafeedAsync(DeleteDatafeedRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Deletes the given Machine Learning Datafeed asynchronously and notifies the listener on completionAcknowledgedResponse
deleteForecast(DeleteForecastRequest request, RequestOptions options)
Deletes Machine Learning Job Forecastsvoid
deleteForecastAsync(DeleteForecastRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Deletes Machine Learning Job Forecasts asynchronouslyDeleteJobResponse
deleteJob(DeleteJobRequest request, RequestOptions options)
Deletes the given Machine Learning Jobvoid
deleteJobAsync(DeleteJobRequest request, RequestOptions options, ActionListener<DeleteJobResponse> listener)
Deletes the given Machine Learning Job asynchronously and notifies the listener on completionFlushJobResponse
flushJob(FlushJobRequest request, RequestOptions options)
Flushes internally buffered data for the given Machine Learning Job ensuring all data sent to the has been processed.void
flushJobAsync(FlushJobRequest request, RequestOptions options, ActionListener<FlushJobResponse> listener)
Flushes internally buffered data for the given Machine Learning Job asynchronously ensuring all data sent to the has been processed.ForecastJobResponse
forecastJob(ForecastJobRequest request, RequestOptions options)
Creates a forecast of an existing, opened Machine Learning Job This predicts the future behavior of a time series by using its historical behavior.void
forecastJobAsync(ForecastJobRequest request, RequestOptions options, ActionListener<ForecastJobResponse> listener)
Creates a forecast of an existing, opened Machine Learning Job asynchronously This predicts the future behavior of a time series by using its historical behavior.GetBucketsResponse
getBuckets(GetBucketsRequest request, RequestOptions options)
Gets the buckets for a Machine Learning Job.void
getBucketsAsync(GetBucketsRequest request, RequestOptions options, ActionListener<GetBucketsResponse> listener)
Gets the buckets for a Machine Learning Job, notifies listener once the requested buckets are retrieved.GetCalendarsResponse
getCalendars(GetCalendarsRequest request, RequestOptions options)
Gets a single or multiple calendars.void
getCalendarsAsync(GetCalendarsRequest request, RequestOptions options, ActionListener<GetCalendarsResponse> listener)
Gets a single or multiple calendars, notifies listener once the requested records are retrieved.GetCategoriesResponse
getCategories(GetCategoriesRequest request, RequestOptions options)
Gets the categories for a Machine Learning Job.void
getCategoriesAsync(GetCategoriesRequest request, RequestOptions options, ActionListener<GetCategoriesResponse> listener)
Gets the categories for a Machine Learning Job, notifies listener once the requested buckets are retrieved.GetDatafeedResponse
getDatafeed(GetDatafeedRequest request, RequestOptions options)
Gets one or more Machine Learning datafeed configuration info.void
getDatafeedAsync(GetDatafeedRequest request, RequestOptions options, ActionListener<GetDatafeedResponse> listener)
Gets one or more Machine Learning datafeed configuration info, asynchronously.GetDatafeedStatsResponse
getDatafeedStats(GetDatafeedStatsRequest request, RequestOptions options)
Gets statistics for one or more Machine Learning datafeedsvoid
getDatafeedStatsAsync(GetDatafeedStatsRequest request, RequestOptions options, ActionListener<GetDatafeedStatsResponse> listener)
Gets statistics for one or more Machine Learning datafeeds, asynchronously.GetInfluencersResponse
getInfluencers(GetInfluencersRequest request, RequestOptions options)
Gets the influencers for a Machine Learning Job.void
getInfluencersAsync(GetInfluencersRequest request, RequestOptions options, ActionListener<GetInfluencersResponse> listener)
Gets the influencers for a Machine Learning Job, notifies listener once the requested influencers are retrieved.GetJobResponse
getJob(GetJobRequest request, RequestOptions options)
Gets one or more Machine Learning job configuration info.void
getJobAsync(GetJobRequest request, RequestOptions options, ActionListener<GetJobResponse> listener)
Gets one or more Machine Learning job configuration info, asynchronously.GetJobStatsResponse
getJobStats(GetJobStatsRequest request, RequestOptions options)
Gets usage statistics for one or more Machine Learning jobsvoid
getJobStatsAsync(GetJobStatsRequest request, RequestOptions options, ActionListener<GetJobStatsResponse> listener)
Gets usage statistics for one or more Machine Learning jobs, asynchronously.GetOverallBucketsResponse
getOverallBuckets(GetOverallBucketsRequest request, RequestOptions options)
Gets overall buckets for a set of Machine Learning Jobs.void
getOverallBucketsAsync(GetOverallBucketsRequest request, RequestOptions options, ActionListener<GetOverallBucketsResponse> listener)
Gets overall buckets for a set of Machine Learning Jobs, notifies listener once the requested buckets are retrieved.GetRecordsResponse
getRecords(GetRecordsRequest request, RequestOptions options)
Gets the records for a Machine Learning Job.void
getRecordsAsync(GetRecordsRequest request, RequestOptions options, ActionListener<GetRecordsResponse> listener)
Gets the records for a Machine Learning Job, notifies listener once the requested records are retrieved.OpenJobResponse
openJob(OpenJobRequest request, RequestOptions options)
Opens a Machine Learning Job.void
openJobAsync(OpenJobRequest request, RequestOptions options, ActionListener<OpenJobResponse> listener)
Opens a Machine Learning Job asynchronously, notifies listener on completion.PostDataResponse
postData(PostDataRequest request, RequestOptions options)
Sends data to an anomaly detection job for analysis.void
postDataAsync(PostDataRequest request, RequestOptions options, ActionListener<PostDataResponse> listener)
Sends data to an anomaly detection job for analysis, asynchronouslyPreviewDatafeedResponse
previewDatafeed(PreviewDatafeedRequest request, RequestOptions options)
Previews the given Machine Learning Datafeedvoid
previewDatafeedAsync(PreviewDatafeedRequest request, RequestOptions options, ActionListener<PreviewDatafeedResponse> listener)
Previews the given Machine Learning Datafeed asynchronously and notifies the listener on completionPutCalendarResponse
putCalendar(PutCalendarRequest request, RequestOptions options)
Create a new machine learning calendarvoid
putCalendarAsync(PutCalendarRequest request, RequestOptions options, ActionListener<PutCalendarResponse> listener)
Create a new machine learning calendar, notifies listener with the created calendarPutDatafeedResponse
putDatafeed(PutDatafeedRequest request, RequestOptions options)
Creates a new Machine Learning Datafeedvoid
putDatafeedAsync(PutDatafeedRequest request, RequestOptions options, ActionListener<PutDatafeedResponse> listener)
Creates a new Machine Learning Datafeed asynchronously and notifies listener on completionPutJobResponse
putJob(PutJobRequest request, RequestOptions options)
Creates a new Machine Learning Jobvoid
putJobAsync(PutJobRequest request, RequestOptions options, ActionListener<PutJobResponse> listener)
Creates a new Machine Learning Job asynchronously and notifies listener on completionStartDatafeedResponse
startDatafeed(StartDatafeedRequest request, RequestOptions options)
Starts the given Machine Learning Datafeedvoid
startDatafeedAsync(StartDatafeedRequest request, RequestOptions options, ActionListener<StartDatafeedResponse> listener)
Starts the given Machine Learning Datafeed asynchronously and notifies the listener on completionStopDatafeedResponse
stopDatafeed(StopDatafeedRequest request, RequestOptions options)
Stops the given Machine Learning Datafeedvoid
stopDatafeedAsync(StopDatafeedRequest request, RequestOptions options, ActionListener<StopDatafeedResponse> listener)
Stops the given Machine Learning Datafeed asynchronously and notifies the listener on completionPutJobResponse
updateJob(UpdateJobRequest request, RequestOptions options)
Updates a Machine LearningJob
void
updateJobAsync(UpdateJobRequest request, RequestOptions options, ActionListener<PutJobResponse> listener)
Updates a Machine LearningJob
asynchronously
-
-
-
Method Detail
-
putJob
public PutJobResponse putJob(PutJobRequest request, RequestOptions options) throws java.io.IOException
Creates a new Machine Learning JobFor additional info see ML PUT job documentation
- Parameters:
request
- The PutJobRequest containing theJob
settingsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- PutJobResponse with enclosed
Job
object - Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
putJobAsync
public void putJobAsync(PutJobRequest request, RequestOptions options, ActionListener<PutJobResponse> listener)
Creates a new Machine Learning Job asynchronously and notifies listener on completionFor additional info see ML PUT job documentation
- Parameters:
request
- The request containing theJob
settingsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
getJob
public GetJobResponse getJob(GetJobRequest request, RequestOptions options) throws java.io.IOException
Gets one or more Machine Learning job configuration info.For additional info see ML GET job documentation
- Parameters:
request
-GetJobRequest
Request containing a list of jobId(s) and additional optionsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
GetJobResponse
response object containing theJob
objects and the number of jobs found- Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
getJobAsync
public void getJobAsync(GetJobRequest request, RequestOptions options, ActionListener<GetJobResponse> listener)
Gets one or more Machine Learning job configuration info, asynchronously.For additional info see ML GET job documentation
- Parameters:
request
-GetJobRequest
Request containing a list of jobId(s) and additional optionsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified withGetJobResponse
upon request completion
-
getJobStats
public GetJobStatsResponse getJobStats(GetJobStatsRequest request, RequestOptions options) throws java.io.IOException
Gets usage statistics for one or more Machine Learning jobsFor additional info see Get job stats docs
- Parameters:
request
-GetJobStatsRequest
Request containing a list of jobId(s) and additional optionsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
GetJobStatsResponse
response object containing theJobStats
objects and the number of jobs found- Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
getJobStatsAsync
public void getJobStatsAsync(GetJobStatsRequest request, RequestOptions options, ActionListener<GetJobStatsResponse> listener)
Gets usage statistics for one or more Machine Learning jobs, asynchronously.For additional info see Get job stats docs
- Parameters:
request
-GetJobStatsRequest
Request containing a list of jobId(s) and additional optionsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified withGetJobStatsResponse
upon request completion
-
deleteJob
public DeleteJobResponse deleteJob(DeleteJobRequest request, RequestOptions options) throws java.io.IOException
Deletes the given Machine Learning JobFor additional info see ML Delete job documentation
- Parameters:
request
- The request to delete the joboptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- The action response which contains the acknowledgement or the task id depending on whether the action was set to wait for completion
- Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
deleteJobAsync
public void deleteJobAsync(DeleteJobRequest request, RequestOptions options, ActionListener<DeleteJobResponse> listener)
Deletes the given Machine Learning Job asynchronously and notifies the listener on completionFor additional info see ML Delete Job documentation
- Parameters:
request
- The request to delete the joboptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
openJob
public OpenJobResponse openJob(OpenJobRequest request, RequestOptions options) throws java.io.IOException
Opens a Machine Learning Job. When you open a new job, it starts with an empty model. When you open an existing job, the most recent model state is automatically loaded. The job is ready to resume its analysis from where it left off, once new data is received.For additional info see ML Open Job documentation
- Parameters:
request
- Request containing job_id and additional optional optionsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- response containing if the job was successfully opened or not.
- Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
openJobAsync
public void openJobAsync(OpenJobRequest request, RequestOptions options, ActionListener<OpenJobResponse> listener)
Opens a Machine Learning Job asynchronously, notifies listener on completion. When you open a new job, it starts with an empty model. When you open an existing job, the most recent model state is automatically loaded. The job is ready to resume its analysis from where it left off, once new data is received.For additional info see ML Open Job documentation
- Parameters:
request
- Request containing job_id and additional optional optionsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
closeJob
public CloseJobResponse closeJob(CloseJobRequest request, RequestOptions options) throws java.io.IOException
Closes one or more Machine Learning Jobs. A job can be opened and closed multiple times throughout its lifecycle. A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results.For additional info see ML Close Job documentation
- Parameters:
request
- Request containing job_ids and additional options. SeeCloseJobRequest
options
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- response containing if the job was successfully closed or not.
- Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
closeJobAsync
public void closeJobAsync(CloseJobRequest request, RequestOptions options, ActionListener<CloseJobResponse> listener)
Closes one or more Machine Learning Jobs asynchronously, notifies listener on completion A closed job cannot receive data or perform analysis operations, but you can still explore and navigate results.For additional info see ML Close Job documentation
- Parameters:
request
- Request containing job_ids and additional options. SeeCloseJobRequest
options
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
flushJob
public FlushJobResponse flushJob(FlushJobRequest request, RequestOptions options) throws java.io.IOException
Flushes internally buffered data for the given Machine Learning Job ensuring all data sent to the has been processed. This may cause new results to be calculated depending on the contents of the buffer Both flush and close operations are similar, however the flush is more efficient if you are expecting to send more data for analysis. When flushing, the job remains open and is available to continue analyzing data. A close operation additionally prunes and persists the model state to disk and the job must be opened again before analyzing further data.For additional info see Flush ML job documentation
- Parameters:
request
- TheFlushJobRequest
object enclosing the `jobId` and additional request optionsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
flushJobAsync
public void flushJobAsync(FlushJobRequest request, RequestOptions options, ActionListener<FlushJobResponse> listener)
Flushes internally buffered data for the given Machine Learning Job asynchronously ensuring all data sent to the has been processed. This may cause new results to be calculated depending on the contents of the buffer Both flush and close operations are similar, however the flush is more efficient if you are expecting to send more data for analysis. When flushing, the job remains open and is available to continue analyzing data. A close operation additionally prunes and persists the model state to disk and the job must be opened again before analyzing further data.For additional info see Flush ML job documentation
- Parameters:
request
- TheFlushJobRequest
object enclosing the `jobId` and additional request optionsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
forecastJob
public ForecastJobResponse forecastJob(ForecastJobRequest request, RequestOptions options) throws java.io.IOException
Creates a forecast of an existing, opened Machine Learning Job This predicts the future behavior of a time series by using its historical behavior.For additional info see Forecast ML Job Documentation
- Parameters:
request
- ForecastJobRequest with forecasting optionsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- response containing forecast acknowledgement and new forecast's ID
- Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
forecastJobAsync
public void forecastJobAsync(ForecastJobRequest request, RequestOptions options, ActionListener<ForecastJobResponse> listener)
Creates a forecast of an existing, opened Machine Learning Job asynchronously This predicts the future behavior of a time series by using its historical behavior.For additional info see Forecast ML Job Documentation
- Parameters:
request
- ForecastJobRequest with forecasting optionsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
deleteForecast
public AcknowledgedResponse deleteForecast(DeleteForecastRequest request, RequestOptions options) throws java.io.IOException
Deletes Machine Learning Job ForecastsFor additional info see Delete Job Forecast Documentation
- Parameters:
request
- theDeleteForecastRequest
object enclosing the desired jobId, forecastIDs, and other optionsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- a AcknowledgedResponse object indicating request success
- Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
deleteForecastAsync
public void deleteForecastAsync(DeleteForecastRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Deletes Machine Learning Job Forecasts asynchronouslyFor additional info see Delete Job Forecast Documentation
- Parameters:
request
- theDeleteForecastRequest
object enclosing the desired jobId, forecastIDs, and other optionsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
putDatafeed
public PutDatafeedResponse putDatafeed(PutDatafeedRequest request, RequestOptions options) throws java.io.IOException
Creates a new Machine Learning DatafeedFor additional info see ML PUT datafeed documentation
- Parameters:
request
- The PutDatafeedRequest containing theDatafeedConfig
settingsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- PutDatafeedResponse with enclosed
DatafeedConfig
object - Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
putDatafeedAsync
public void putDatafeedAsync(PutDatafeedRequest request, RequestOptions options, ActionListener<PutDatafeedResponse> listener)
Creates a new Machine Learning Datafeed asynchronously and notifies listener on completionFor additional info see ML PUT datafeed documentation
- Parameters:
request
- The request containing theDatafeedConfig
settingsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
getDatafeed
public GetDatafeedResponse getDatafeed(GetDatafeedRequest request, RequestOptions options) throws java.io.IOException
Gets one or more Machine Learning datafeed configuration info.For additional info see ML GET datafeed documentation
- Parameters:
request
-GetDatafeedRequest
Request containing a list of datafeedId(s) and additional optionsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
GetDatafeedResponse
response object containing theDatafeedConfig
objects and the number of jobs found- Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
getDatafeedAsync
public void getDatafeedAsync(GetDatafeedRequest request, RequestOptions options, ActionListener<GetDatafeedResponse> listener)
Gets one or more Machine Learning datafeed configuration info, asynchronously.For additional info see ML GET datafeed documentation
- Parameters:
request
-GetDatafeedRequest
Request containing a list of datafeedId(s) and additional optionsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified withGetDatafeedResponse
upon request completion
-
deleteDatafeed
public AcknowledgedResponse deleteDatafeed(DeleteDatafeedRequest request, RequestOptions options) throws java.io.IOException
Deletes the given Machine Learning DatafeedFor additional info see ML Delete Datafeed documentation
- Parameters:
request
- The request to delete the datafeedoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- action acknowledgement
- Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
deleteDatafeedAsync
public void deleteDatafeedAsync(DeleteDatafeedRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Deletes the given Machine Learning Datafeed asynchronously and notifies the listener on completionFor additional info see ML Delete Datafeed documentation
- Parameters:
request
- The request to delete the datafeedoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
startDatafeed
public StartDatafeedResponse startDatafeed(StartDatafeedRequest request, RequestOptions options) throws java.io.IOException
Starts the given Machine Learning DatafeedFor additional info see ML Start Datafeed documentation
- Parameters:
request
- The request to start the datafeedoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- action acknowledgement
- Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
startDatafeedAsync
public void startDatafeedAsync(StartDatafeedRequest request, RequestOptions options, ActionListener<StartDatafeedResponse> listener)
Starts the given Machine Learning Datafeed asynchronously and notifies the listener on completionFor additional info see ML Start Datafeed documentation
- Parameters:
request
- The request to start the datafeedoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
stopDatafeed
public StopDatafeedResponse stopDatafeed(StopDatafeedRequest request, RequestOptions options) throws java.io.IOException
Stops the given Machine Learning DatafeedFor additional info see ML Stop Datafeed documentation
- Parameters:
request
- The request to stop the datafeedoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- action acknowledgement
- Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
stopDatafeedAsync
public void stopDatafeedAsync(StopDatafeedRequest request, RequestOptions options, ActionListener<StopDatafeedResponse> listener)
Stops the given Machine Learning Datafeed asynchronously and notifies the listener on completionFor additional info see ML Stop Datafeed documentation
- Parameters:
request
- The request to stop the datafeedoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
getDatafeedStats
public GetDatafeedStatsResponse getDatafeedStats(GetDatafeedStatsRequest request, RequestOptions options) throws java.io.IOException
Gets statistics for one or more Machine Learning datafeedsFor additional info see Get datafeed stats docs
- Parameters:
request
-GetDatafeedStatsRequest
Request containing a list of datafeedId(s) and additional optionsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
GetDatafeedStatsResponse
response object containing theDatafeedStats
objects and the number of datafeeds found- Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
previewDatafeed
public PreviewDatafeedResponse previewDatafeed(PreviewDatafeedRequest request, RequestOptions options) throws java.io.IOException
Previews the given Machine Learning DatafeedFor additional info see ML Preview Datafeed documentation
- Parameters:
request
- The request to preview the datafeedoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
PreviewDatafeedResponse
object containing aBytesReference
of the data in JSON format- Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
getDatafeedStatsAsync
public void getDatafeedStatsAsync(GetDatafeedStatsRequest request, RequestOptions options, ActionListener<GetDatafeedStatsResponse> listener)
Gets statistics for one or more Machine Learning datafeeds, asynchronously.For additional info see Get datafeed stats docs
- Parameters:
request
-GetDatafeedStatsRequest
Request containing a list of datafeedId(s) and additional optionsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified withGetDatafeedStatsResponse
upon request completion
-
previewDatafeedAsync
public void previewDatafeedAsync(PreviewDatafeedRequest request, RequestOptions options, ActionListener<PreviewDatafeedResponse> listener)
Previews the given Machine Learning Datafeed asynchronously and notifies the listener on completionFor additional info see ML Preview Datafeed documentation
- Parameters:
request
- The request to preview the datafeedoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
updateJob
public PutJobResponse updateJob(UpdateJobRequest request, RequestOptions options) throws java.io.IOException
Updates a Machine LearningJob
For additional info see ML Update Job Documentation
- Parameters:
request
- theUpdateJobRequest
object enclosing the desired updatesoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- a PutJobResponse object containing the updated job object
- Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
updateJobAsync
public void updateJobAsync(UpdateJobRequest request, RequestOptions options, ActionListener<PutJobResponse> listener)
Updates a Machine LearningJob
asynchronouslyFor additional info see ML Update Job Documentation
- Parameters:
request
- theUpdateJobRequest
object enclosing the desired updatesoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
getBuckets
public GetBucketsResponse getBuckets(GetBucketsRequest request, RequestOptions options) throws java.io.IOException
Gets the buckets for a Machine Learning Job.For additional info see ML GET buckets documentation
- Parameters:
request
- The requestoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Throws:
java.io.IOException
-
getBucketsAsync
public void getBucketsAsync(GetBucketsRequest request, RequestOptions options, ActionListener<GetBucketsResponse> listener)
Gets the buckets for a Machine Learning Job, notifies listener once the requested buckets are retrieved.For additional info see ML GET buckets documentation
- Parameters:
request
- The requestoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
getCategories
public GetCategoriesResponse getCategories(GetCategoriesRequest request, RequestOptions options) throws java.io.IOException
Gets the categories for a Machine Learning Job.For additional info see ML GET categories documentation
- Parameters:
request
- The requestoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
getCategoriesAsync
public void getCategoriesAsync(GetCategoriesRequest request, RequestOptions options, ActionListener<GetCategoriesResponse> listener)
Gets the categories for a Machine Learning Job, notifies listener once the requested buckets are retrieved.For additional info see ML GET categories documentation
- Parameters:
request
- The requestoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
getOverallBuckets
public GetOverallBucketsResponse getOverallBuckets(GetOverallBucketsRequest request, RequestOptions options) throws java.io.IOException
Gets overall buckets for a set of Machine Learning Jobs.For additional info see ML GET overall buckets documentation
- Parameters:
request
- The requestoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Throws:
java.io.IOException
-
getOverallBucketsAsync
public void getOverallBucketsAsync(GetOverallBucketsRequest request, RequestOptions options, ActionListener<GetOverallBucketsResponse> listener)
Gets overall buckets for a set of Machine Learning Jobs, notifies listener once the requested buckets are retrieved.For additional info see ML GET overall buckets documentation
- Parameters:
request
- The requestoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
getRecords
public GetRecordsResponse getRecords(GetRecordsRequest request, RequestOptions options) throws java.io.IOException
Gets the records for a Machine Learning Job.For additional info see ML GET records documentation
- Parameters:
request
- the requestoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Throws:
java.io.IOException
-
getRecordsAsync
public void getRecordsAsync(GetRecordsRequest request, RequestOptions options, ActionListener<GetRecordsResponse> listener)
Gets the records for a Machine Learning Job, notifies listener once the requested records are retrieved.For additional info see ML GET records documentation
- Parameters:
request
- the requestoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
postData
public PostDataResponse postData(PostDataRequest request, RequestOptions options) throws java.io.IOException
Sends data to an anomaly detection job for analysis.NOTE: The job must have a state of open to receive and process the data.
For additional info see ML POST Data documentation
- Parameters:
request
- PostDataRequest containing the data to post and some additional optionsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- response containing operational progress about the job
- Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
postDataAsync
public void postDataAsync(PostDataRequest request, RequestOptions options, ActionListener<PostDataResponse> listener)
Sends data to an anomaly detection job for analysis, asynchronouslyNOTE: The job must have a state of open to receive and process the data.
For additional info see ML POST Data documentation
- Parameters:
request
- PostDataRequest containing the data to post and some additional optionsoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
getCalendars
public GetCalendarsResponse getCalendars(GetCalendarsRequest request, RequestOptions options) throws java.io.IOException
Gets a single or multiple calendars.For additional info see ML GET calendars documentation
- Parameters:
request
- The calendars requestoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
GetCalendarsResponse
response object containing theCalendar
objects and the number of calendars found- Throws:
java.io.IOException
-
getCalendarsAsync
public void getCalendarsAsync(GetCalendarsRequest request, RequestOptions options, ActionListener<GetCalendarsResponse> listener)
Gets a single or multiple calendars, notifies listener once the requested records are retrieved.For additional info see ML GET calendars documentation
- Parameters:
request
- The calendars requestoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
getInfluencers
public GetInfluencersResponse getInfluencers(GetInfluencersRequest request, RequestOptions options) throws java.io.IOException
Gets the influencers for a Machine Learning Job.For additional info see ML GET influencers documentation
- Parameters:
request
- the requestoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Throws:
java.io.IOException
-
getInfluencersAsync
public void getInfluencersAsync(GetInfluencersRequest request, RequestOptions options, ActionListener<GetInfluencersResponse> listener)
Gets the influencers for a Machine Learning Job, notifies listener once the requested influencers are retrieved.For additional info * see ML GET influencers documentation
- Parameters:
request
- the requestoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
putCalendar
public PutCalendarResponse putCalendar(PutCalendarRequest request, RequestOptions options) throws java.io.IOException
Create a new machine learning calendarFor additional info see ML create calendar documentation
- Parameters:
request
- The requestoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- The
PutCalendarResponse
containing the calendar - Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
putCalendarAsync
public void putCalendarAsync(PutCalendarRequest request, RequestOptions options, ActionListener<PutCalendarResponse> listener)
Create a new machine learning calendar, notifies listener with the created calendarFor additional info see ML create calendar documentation
- Parameters:
request
- The requestoptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
deleteCalendar
public AcknowledgedResponse deleteCalendar(DeleteCalendarRequest request, RequestOptions options) throws java.io.IOException
Deletes the given Machine Learning CalendarFor additional info see ML Delete calendar documentation
- Parameters:
request
- The request to delete the calendaroptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customized- Returns:
- action acknowledgement
- Throws:
java.io.IOException
- when there is a serialization issue sending the request or receiving the response
-
deleteCalendarAsync
public void deleteCalendarAsync(DeleteCalendarRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)
Deletes the given Machine Learning Job asynchronously and notifies the listener on completionFor additional info see ML Delete calendar documentation
- Parameters:
request
- The request to delete the calendaroptions
- Additional request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- Listener to be notified upon request completion
-
-