Search in sources :

Example 1 with AnomalyIndexHandler

use of org.opensearch.ad.transport.handler.AnomalyIndexHandler in project anomaly-detection by opensearch-project.

the class AnomalyDetectorPlugin method getRestHandlers.

@Override
public List<RestHandler> getRestHandlers(Settings settings, RestController restController, ClusterSettings clusterSettings, IndexScopedSettings indexScopedSettings, SettingsFilter settingsFilter, IndexNameExpressionResolver indexNameExpressionResolver, Supplier<DiscoveryNodes> nodesInCluster) {
    AnomalyIndexHandler<AnomalyResult> anomalyResultHandler = new AnomalyIndexHandler<AnomalyResult>(client, settings, threadPool, CommonName.ANOMALY_RESULT_INDEX_ALIAS, anomalyDetectionIndices, this.clientUtil, this.indexUtils, clusterService);
    AnomalyDetectorJobRunner jobRunner = AnomalyDetectorJobRunner.getJobRunnerInstance();
    jobRunner.setClient(client);
    jobRunner.setThreadPool(threadPool);
    jobRunner.setAnomalyResultHandler(anomalyResultHandler);
    jobRunner.setSettings(settings);
    jobRunner.setAnomalyDetectionIndices(anomalyDetectionIndices);
    jobRunner.setNodeFilter(nodeFilter);
    jobRunner.setAdTaskManager(adTaskManager);
    RestGetAnomalyDetectorAction restGetAnomalyDetectorAction = new RestGetAnomalyDetectorAction();
    RestIndexAnomalyDetectorAction restIndexAnomalyDetectorAction = new RestIndexAnomalyDetectorAction(settings, clusterService);
    RestSearchAnomalyDetectorAction searchAnomalyDetectorAction = new RestSearchAnomalyDetectorAction();
    RestSearchAnomalyResultAction searchAnomalyResultAction = new RestSearchAnomalyResultAction();
    RestSearchADTasksAction searchADTasksAction = new RestSearchADTasksAction();
    RestDeleteAnomalyDetectorAction deleteAnomalyDetectorAction = new RestDeleteAnomalyDetectorAction();
    RestExecuteAnomalyDetectorAction executeAnomalyDetectorAction = new RestExecuteAnomalyDetectorAction(settings, clusterService);
    RestStatsAnomalyDetectorAction statsAnomalyDetectorAction = new RestStatsAnomalyDetectorAction(adStats, this.nodeFilter);
    RestAnomalyDetectorJobAction anomalyDetectorJobAction = new RestAnomalyDetectorJobAction(settings, clusterService);
    RestSearchAnomalyDetectorInfoAction searchAnomalyDetectorInfoAction = new RestSearchAnomalyDetectorInfoAction();
    RestPreviewAnomalyDetectorAction previewAnomalyDetectorAction = new RestPreviewAnomalyDetectorAction();
    RestDeleteAnomalyResultsAction deleteAnomalyResultsAction = new RestDeleteAnomalyResultsAction();
    RestSearchTopAnomalyResultAction searchTopAnomalyResultAction = new RestSearchTopAnomalyResultAction();
    RestValidateAnomalyDetectorAction validateAnomalyDetectorAction = new RestValidateAnomalyDetectorAction(settings, clusterService);
    return ImmutableList.of(restGetAnomalyDetectorAction, restIndexAnomalyDetectorAction, searchAnomalyDetectorAction, searchAnomalyResultAction, searchADTasksAction, deleteAnomalyDetectorAction, executeAnomalyDetectorAction, anomalyDetectorJobAction, statsAnomalyDetectorAction, searchAnomalyDetectorInfoAction, previewAnomalyDetectorAction, deleteAnomalyResultsAction, searchTopAnomalyResultAction, validateAnomalyDetectorAction);
}
Also used : RestIndexAnomalyDetectorAction(org.opensearch.ad.rest.RestIndexAnomalyDetectorAction) RestSearchAnomalyResultAction(org.opensearch.ad.rest.RestSearchAnomalyResultAction) RestSearchAnomalyDetectorAction(org.opensearch.ad.rest.RestSearchAnomalyDetectorAction) RestExecuteAnomalyDetectorAction(org.opensearch.ad.rest.RestExecuteAnomalyDetectorAction) RestSearchTopAnomalyResultAction(org.opensearch.ad.rest.RestSearchTopAnomalyResultAction) RestValidateAnomalyDetectorAction(org.opensearch.ad.rest.RestValidateAnomalyDetectorAction) RestAnomalyDetectorJobAction(org.opensearch.ad.rest.RestAnomalyDetectorJobAction) RestSearchAnomalyDetectorInfoAction(org.opensearch.ad.rest.RestSearchAnomalyDetectorInfoAction) RestDeleteAnomalyResultsAction(org.opensearch.ad.rest.RestDeleteAnomalyResultsAction) RestStatsAnomalyDetectorAction(org.opensearch.ad.rest.RestStatsAnomalyDetectorAction) RestSearchADTasksAction(org.opensearch.ad.rest.RestSearchADTasksAction) AnomalyResult(org.opensearch.ad.model.AnomalyResult) RestPreviewAnomalyDetectorAction(org.opensearch.ad.rest.RestPreviewAnomalyDetectorAction) RestGetAnomalyDetectorAction(org.opensearch.ad.rest.RestGetAnomalyDetectorAction) AnomalyIndexHandler(org.opensearch.ad.transport.handler.AnomalyIndexHandler) RestDeleteAnomalyDetectorAction(org.opensearch.ad.rest.RestDeleteAnomalyDetectorAction)

Aggregations

AnomalyResult (org.opensearch.ad.model.AnomalyResult)1 RestAnomalyDetectorJobAction (org.opensearch.ad.rest.RestAnomalyDetectorJobAction)1 RestDeleteAnomalyDetectorAction (org.opensearch.ad.rest.RestDeleteAnomalyDetectorAction)1 RestDeleteAnomalyResultsAction (org.opensearch.ad.rest.RestDeleteAnomalyResultsAction)1 RestExecuteAnomalyDetectorAction (org.opensearch.ad.rest.RestExecuteAnomalyDetectorAction)1 RestGetAnomalyDetectorAction (org.opensearch.ad.rest.RestGetAnomalyDetectorAction)1 RestIndexAnomalyDetectorAction (org.opensearch.ad.rest.RestIndexAnomalyDetectorAction)1 RestPreviewAnomalyDetectorAction (org.opensearch.ad.rest.RestPreviewAnomalyDetectorAction)1 RestSearchADTasksAction (org.opensearch.ad.rest.RestSearchADTasksAction)1 RestSearchAnomalyDetectorAction (org.opensearch.ad.rest.RestSearchAnomalyDetectorAction)1 RestSearchAnomalyDetectorInfoAction (org.opensearch.ad.rest.RestSearchAnomalyDetectorInfoAction)1 RestSearchAnomalyResultAction (org.opensearch.ad.rest.RestSearchAnomalyResultAction)1 RestSearchTopAnomalyResultAction (org.opensearch.ad.rest.RestSearchTopAnomalyResultAction)1 RestStatsAnomalyDetectorAction (org.opensearch.ad.rest.RestStatsAnomalyDetectorAction)1 RestValidateAnomalyDetectorAction (org.opensearch.ad.rest.RestValidateAnomalyDetectorAction)1 AnomalyIndexHandler (org.opensearch.ad.transport.handler.AnomalyIndexHandler)1