Class MachineLearningClient
- java.lang.Object
-
- org.elasticsearch.client.MachineLearningClient
-
public final class MachineLearningClient extends java.lang.ObjectMachine Learning API client wrapper for theRestHighLevelClientSee the X-Pack Machine Learning APIs for additional information.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CloseJobResponsecloseJob(CloseJobRequest request, RequestOptions options)Closes one or more Machine Learning Jobs.voidcloseJobAsync(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.AcknowledgedResponsedeleteCalendar(DeleteCalendarRequest request, RequestOptions options)Deletes the given Machine Learning CalendarvoiddeleteCalendarAsync(DeleteCalendarRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Deletes the given Machine Learning Job asynchronously and notifies the listener on completionAcknowledgedResponsedeleteDatafeed(DeleteDatafeedRequest request, RequestOptions options)Deletes the given Machine Learning DatafeedvoiddeleteDatafeedAsync(DeleteDatafeedRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Deletes the given Machine Learning Datafeed asynchronously and notifies the listener on completionAcknowledgedResponsedeleteForecast(DeleteForecastRequest request, RequestOptions options)Deletes Machine Learning Job ForecastsvoiddeleteForecastAsync(DeleteForecastRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Deletes Machine Learning Job Forecasts asynchronouslyDeleteJobResponsedeleteJob(DeleteJobRequest request, RequestOptions options)Deletes the given Machine Learning JobvoiddeleteJobAsync(DeleteJobRequest request, RequestOptions options, ActionListener<DeleteJobResponse> listener)Deletes the given Machine Learning Job asynchronously and notifies the listener on completionFlushJobResponseflushJob(FlushJobRequest request, RequestOptions options)Flushes internally buffered data for the given Machine Learning Job ensuring all data sent to the has been processed.voidflushJobAsync(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.ForecastJobResponseforecastJob(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.voidforecastJobAsync(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.GetBucketsResponsegetBuckets(GetBucketsRequest request, RequestOptions options)Gets the buckets for a Machine Learning Job.voidgetBucketsAsync(GetBucketsRequest request, RequestOptions options, ActionListener<GetBucketsResponse> listener)Gets the buckets for a Machine Learning Job, notifies listener once the requested buckets are retrieved.GetCalendarsResponsegetCalendars(GetCalendarsRequest request, RequestOptions options)Gets a single or multiple calendars.voidgetCalendarsAsync(GetCalendarsRequest request, RequestOptions options, ActionListener<GetCalendarsResponse> listener)Gets a single or multiple calendars, notifies listener once the requested records are retrieved.GetCategoriesResponsegetCategories(GetCategoriesRequest request, RequestOptions options)Gets the categories for a Machine Learning Job.voidgetCategoriesAsync(GetCategoriesRequest request, RequestOptions options, ActionListener<GetCategoriesResponse> listener)Gets the categories for a Machine Learning Job, notifies listener once the requested buckets are retrieved.GetDatafeedResponsegetDatafeed(GetDatafeedRequest request, RequestOptions options)Gets one or more Machine Learning datafeed configuration info.voidgetDatafeedAsync(GetDatafeedRequest request, RequestOptions options, ActionListener<GetDatafeedResponse> listener)Gets one or more Machine Learning datafeed configuration info, asynchronously.GetDatafeedStatsResponsegetDatafeedStats(GetDatafeedStatsRequest request, RequestOptions options)Gets statistics for one or more Machine Learning datafeedsvoidgetDatafeedStatsAsync(GetDatafeedStatsRequest request, RequestOptions options, ActionListener<GetDatafeedStatsResponse> listener)Gets statistics for one or more Machine Learning datafeeds, asynchronously.GetInfluencersResponsegetInfluencers(GetInfluencersRequest request, RequestOptions options)Gets the influencers for a Machine Learning Job.voidgetInfluencersAsync(GetInfluencersRequest request, RequestOptions options, ActionListener<GetInfluencersResponse> listener)Gets the influencers for a Machine Learning Job, notifies listener once the requested influencers are retrieved.GetJobResponsegetJob(GetJobRequest request, RequestOptions options)Gets one or more Machine Learning job configuration info.voidgetJobAsync(GetJobRequest request, RequestOptions options, ActionListener<GetJobResponse> listener)Gets one or more Machine Learning job configuration info, asynchronously.GetJobStatsResponsegetJobStats(GetJobStatsRequest request, RequestOptions options)Gets usage statistics for one or more Machine Learning jobsvoidgetJobStatsAsync(GetJobStatsRequest request, RequestOptions options, ActionListener<GetJobStatsResponse> listener)Gets usage statistics for one or more Machine Learning jobs, asynchronously.GetOverallBucketsResponsegetOverallBuckets(GetOverallBucketsRequest request, RequestOptions options)Gets overall buckets for a set of Machine Learning Jobs.voidgetOverallBucketsAsync(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.GetRecordsResponsegetRecords(GetRecordsRequest request, RequestOptions options)Gets the records for a Machine Learning Job.voidgetRecordsAsync(GetRecordsRequest request, RequestOptions options, ActionListener<GetRecordsResponse> listener)Gets the records for a Machine Learning Job, notifies listener once the requested records are retrieved.OpenJobResponseopenJob(OpenJobRequest request, RequestOptions options)Opens a Machine Learning Job.voidopenJobAsync(OpenJobRequest request, RequestOptions options, ActionListener<OpenJobResponse> listener)Opens a Machine Learning Job asynchronously, notifies listener on completion.PostDataResponsepostData(PostDataRequest request, RequestOptions options)Sends data to an anomaly detection job for analysis.voidpostDataAsync(PostDataRequest request, RequestOptions options, ActionListener<PostDataResponse> listener)Sends data to an anomaly detection job for analysis, asynchronouslyPreviewDatafeedResponsepreviewDatafeed(PreviewDatafeedRequest request, RequestOptions options)Previews the given Machine Learning DatafeedvoidpreviewDatafeedAsync(PreviewDatafeedRequest request, RequestOptions options, ActionListener<PreviewDatafeedResponse> listener)Previews the given Machine Learning Datafeed asynchronously and notifies the listener on completionPutCalendarResponseputCalendar(PutCalendarRequest request, RequestOptions options)Create a new machine learning calendarvoidputCalendarAsync(PutCalendarRequest request, RequestOptions options, ActionListener<PutCalendarResponse> listener)Create a new machine learning calendar, notifies listener with the created calendarPutDatafeedResponseputDatafeed(PutDatafeedRequest request, RequestOptions options)Creates a new Machine Learning DatafeedvoidputDatafeedAsync(PutDatafeedRequest request, RequestOptions options, ActionListener<PutDatafeedResponse> listener)Creates a new Machine Learning Datafeed asynchronously and notifies listener on completionPutJobResponseputJob(PutJobRequest request, RequestOptions options)Creates a new Machine Learning JobvoidputJobAsync(PutJobRequest request, RequestOptions options, ActionListener<PutJobResponse> listener)Creates a new Machine Learning Job asynchronously and notifies listener on completionStartDatafeedResponsestartDatafeed(StartDatafeedRequest request, RequestOptions options)Starts the given Machine Learning DatafeedvoidstartDatafeedAsync(StartDatafeedRequest request, RequestOptions options, ActionListener<StartDatafeedResponse> listener)Starts the given Machine Learning Datafeed asynchronously and notifies the listener on completionStopDatafeedResponsestopDatafeed(StopDatafeedRequest request, RequestOptions options)Stops the given Machine Learning DatafeedvoidstopDatafeedAsync(StopDatafeedRequest request, RequestOptions options, ActionListener<StopDatafeedResponse> listener)Stops the given Machine Learning Datafeed asynchronously and notifies the listener on completionPutJobResponseupdateJob(UpdateJobRequest request, RequestOptions options)Updates a Machine LearningJobvoidupdateJobAsync(UpdateJobRequest request, RequestOptions options, ActionListener<PutJobResponse> listener)Updates a Machine LearningJobasynchronously
-
-
-
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 theJobsettingsoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- PutJobResponse with enclosed
Jobobject - 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 theJobsettingsoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif 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-GetJobRequestRequest containing a list of jobId(s) and additional optionsoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
GetJobResponseresponse object containing theJobobjects 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-GetJobRequestRequest containing a list of jobId(s) and additional optionsoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- Listener to be notified withGetJobResponseupon 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-GetJobStatsRequestRequest containing a list of jobId(s) and additional optionsoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
GetJobStatsResponseresponse object containing theJobStatsobjects 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-GetJobStatsRequestRequest containing a list of jobId(s) and additional optionsoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- Listener to be notified withGetJobStatsResponseupon 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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. SeeCloseJobRequestoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif 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. SeeCloseJobRequestoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif 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- TheFlushJobRequestobject enclosing the `jobId` and additional request optionsoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif 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- TheFlushJobRequestobject enclosing the `jobId` and additional request optionsoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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- theDeleteForecastRequestobject enclosing the desired jobId, forecastIDs, and other optionsoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif 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- theDeleteForecastRequestobject enclosing the desired jobId, forecastIDs, and other optionsoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif 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 theDatafeedConfigsettingsoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
- PutDatafeedResponse with enclosed
DatafeedConfigobject - 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 theDatafeedConfigsettingsoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif 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-GetDatafeedRequestRequest containing a list of datafeedId(s) and additional optionsoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
GetDatafeedResponseresponse object containing theDatafeedConfigobjects 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-GetDatafeedRequestRequest containing a list of datafeedId(s) and additional optionsoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- Listener to be notified withGetDatafeedResponseupon 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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-GetDatafeedStatsRequestRequest containing a list of datafeedId(s) and additional optionsoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customized- Returns:
GetDatafeedStatsResponseresponse object containing theDatafeedStatsobjects 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.DEFAULTif nothing needs to be customized- Returns:
PreviewDatafeedResponseobject containing aBytesReferenceof 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-GetDatafeedStatsRequestRequest containing a list of datafeedId(s) and additional optionsoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- Listener to be notified withGetDatafeedStatsResponseupon 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.DEFAULTif 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 LearningJobFor additional info see ML Update Job Documentation
- Parameters:
request- theUpdateJobRequestobject enclosing the desired updatesoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif 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 LearningJobasynchronouslyFor additional info see ML Update Job Documentation
- Parameters:
request- theUpdateJobRequestobject enclosing the desired updatesoptions- Additional request options (e.g. headers), useRequestOptions.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif nothing needs to be customized- Returns:
GetCalendarsResponseresponse object containing theCalendarobjects 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif nothing needs to be customized- Returns:
- The
PutCalendarResponsecontaining 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.DEFAULTif 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.DEFAULTif 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.DEFAULTif nothing needs to be customizedlistener- Listener to be notified upon request completion
-
-