Search in sources :

Example 1 with ClientUtil

use of org.opensearch.ad.util.ClientUtil in project anomaly-detection by opensearch-project.

the class AbstractIndexHandlerTest method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    MockitoAnnotations.initMocks(this);
    setWriteBlockAdResultIndex(false);
    context = TestHelpers.createThreadPool();
    clientUtil = new ClientUtil(settings, client, throttler, context);
    indexUtil = new IndexUtils(client, clientUtil, clusterService, indexNameResolver);
}
Also used : IndexUtils(org.opensearch.ad.util.IndexUtils) ClientUtil(org.opensearch.ad.util.ClientUtil)

Example 2 with ClientUtil

use of org.opensearch.ad.util.ClientUtil in project anomaly-detection by opensearch-project.

the class ADStatsNodesTransportActionTests method setUp.

@Override
@Before
public void setUp() throws Exception {
    super.setUp();
    Client client = client();
    Clock clock = mock(Clock.class);
    Throttler throttler = new Throttler(clock);
    ThreadPool threadPool = mock(ThreadPool.class);
    IndexNameExpressionResolver indexNameResolver = mock(IndexNameExpressionResolver.class);
    IndexUtils indexUtils = new IndexUtils(client, new ClientUtil(Settings.EMPTY, client, throttler, threadPool), clusterService(), indexNameResolver);
    ModelManager modelManager = mock(ModelManager.class);
    CacheProvider cacheProvider = mock(CacheProvider.class);
    EntityCache cache = mock(EntityCache.class);
    when(cacheProvider.get()).thenReturn(cache);
    clusterStatName1 = "clusterStat1";
    clusterStatName2 = "clusterStat2";
    nodeStatName1 = "nodeStat1";
    nodeStatName2 = "nodeStat2";
    Settings settings = Settings.builder().put(MAX_MODEL_SIZE_PER_NODE.getKey(), 10).build();
    ClusterService clusterService = mock(ClusterService.class);
    ClusterSettings clusterSettings = new ClusterSettings(Settings.EMPTY, Collections.unmodifiableSet(new HashSet<>(Arrays.asList(MAX_MODEL_SIZE_PER_NODE))));
    when(clusterService.getClusterSettings()).thenReturn(clusterSettings);
    statsMap = new HashMap<String, ADStat<?>>() {

        {
            put(nodeStatName1, new ADStat<>(false, new CounterSupplier()));
            put(nodeStatName2, new ADStat<>(false, new ModelsOnNodeSupplier(modelManager, cacheProvider, settings, clusterService)));
            put(clusterStatName1, new ADStat<>(true, new IndexStatusSupplier(indexUtils, "index1")));
            put(clusterStatName2, new ADStat<>(true, new IndexStatusSupplier(indexUtils, "index2")));
            put(InternalStatNames.JVM_HEAP_USAGE.getName(), new ADStat<>(true, new SettableSupplier()));
        }
    };
    adStats = new ADStats(statsMap);
    JvmService jvmService = mock(JvmService.class);
    JvmStats jvmStats = mock(JvmStats.class);
    JvmStats.Mem mem = mock(JvmStats.Mem.class);
    when(jvmService.stats()).thenReturn(jvmStats);
    when(jvmStats.getMem()).thenReturn(mem);
    when(mem.getHeapUsedPercent()).thenReturn(randomShort());
    adTaskManager = mock(ADTaskManager.class);
    action = new ADStatsNodesTransportAction(client().threadPool(), clusterService(), mock(TransportService.class), mock(ActionFilters.class), adStats, jvmService, adTaskManager);
}
Also used : ModelsOnNodeSupplier(org.opensearch.ad.stats.suppliers.ModelsOnNodeSupplier) ClusterSettings(org.opensearch.common.settings.ClusterSettings) EntityCache(org.opensearch.ad.caching.EntityCache) ClientUtil(org.opensearch.ad.util.ClientUtil) ADStat(org.opensearch.ad.stats.ADStat) ThreadPool(org.opensearch.threadpool.ThreadPool) Clock(java.time.Clock) CounterSupplier(org.opensearch.ad.stats.suppliers.CounterSupplier) IndexUtils(org.opensearch.ad.util.IndexUtils) JvmService(org.opensearch.monitor.jvm.JvmService) Client(org.opensearch.client.Client) ClusterSettings(org.opensearch.common.settings.ClusterSettings) Settings(org.opensearch.common.settings.Settings) Throttler(org.opensearch.ad.util.Throttler) HashSet(java.util.HashSet) JvmStats(org.opensearch.monitor.jvm.JvmStats) ModelManager(org.opensearch.ad.ml.ModelManager) CacheProvider(org.opensearch.ad.caching.CacheProvider) SettableSupplier(org.opensearch.ad.stats.suppliers.SettableSupplier) ClusterService(org.opensearch.cluster.service.ClusterService) IndexStatusSupplier(org.opensearch.ad.stats.suppliers.IndexStatusSupplier) ADTaskManager(org.opensearch.ad.task.ADTaskManager) ADStats(org.opensearch.ad.stats.ADStats) IndexNameExpressionResolver(org.opensearch.cluster.metadata.IndexNameExpressionResolver) Before(org.junit.Before)

Example 3 with ClientUtil

use of org.opensearch.ad.util.ClientUtil in project anomaly-detection by opensearch-project.

the class NoPowermockSearchFeatureDaoTests method testGetHighestCountEntitiesExhaustedPages.

@SuppressWarnings("unchecked")
public void testGetHighestCountEntitiesExhaustedPages() throws InterruptedException {
    SearchResponse response1 = createPageResponse(attrs1);
    CompositeAggregation emptyComposite = mock(CompositeAggregation.class);
    when(emptyComposite.getName()).thenReturn(SearchFeatureDao.AGG_NAME_TOP);
    when(emptyComposite.afterKey()).thenReturn(null);
    // empty bucket
    when(emptyComposite.getBuckets()).thenAnswer((Answer<List<CompositeAggregation.Bucket>>) invocation -> {
        return new ArrayList<CompositeAggregation.Bucket>();
    });
    Aggregations emptyAggs = new Aggregations(Collections.singletonList(emptyComposite));
    SearchResponseSections emptySections = new SearchResponseSections(SearchHits.empty(), emptyAggs, null, false, null, null, 1);
    SearchResponse emptyResponse = new SearchResponse(emptySections, null, 1, 1, 0, 0, ShardSearchFailure.EMPTY_ARRAY, Clusters.EMPTY);
    CountDownLatch inProgress = new CountDownLatch(2);
    doAnswer(invocation -> {
        ActionListener<SearchResponse> listener = invocation.getArgument(1);
        inProgress.countDown();
        if (inProgress.getCount() == 1) {
            listener.onResponse(response1);
        } else {
            listener.onResponse(emptyResponse);
        }
        return null;
    }).when(client).search(any(), any());
    ActionListener<List<Entity>> listener = mock(ActionListener.class);
    searchFeatureDao = new SearchFeatureDao(client, xContentRegistry(), interpolator, clientUtil, settings, clusterService, AnomalyDetectorSettings.NUM_SAMPLES_PER_TREE, clock, 2, 1, 60_000L);
    searchFeatureDao.getHighestCountEntities(detector, 10L, 20L, listener);
    ArgumentCaptor<List<Entity>> captor = ArgumentCaptor.forClass(List.class);
    verify(listener).onResponse(captor.capture());
    List<Entity> result = captor.getValue();
    assertEquals(1, result.size());
    assertEquals(Entity.createEntityByReordering(attrs1), result.get(0));
    // both counts are used in client.search
    assertTrue(inProgress.await(10000L, TimeUnit.MILLISECONDS));
}
Also used : Arrays(java.util.Arrays) IsInstanceOf.instanceOf(org.hamcrest.core.IsInstanceOf.instanceOf) NoneCircuitBreakerService(org.opensearch.indices.breaker.NoneCircuitBreakerService) AbstractADTest(org.opensearch.ad.AbstractADTest) Releasables(org.opensearch.common.lease.Releasables) AggregationBuilder(org.opensearch.search.aggregations.AggregationBuilder) InternalMax(org.opensearch.search.aggregations.metrics.InternalMax) MockBigArrays(org.opensearch.common.util.MockBigArrays) Mockito.doAnswer(org.mockito.Mockito.doAnswer) Map(java.util.Map) SingleFeatureLinearUniformInterpolator(org.opensearch.ad.dataprocessor.SingleFeatureLinearUniformInterpolator) InternalAggregations(org.opensearch.search.aggregations.InternalAggregations) ZoneOffset(java.time.ZoneOffset) ActionListener(org.opensearch.action.ActionListener) MockPageCacheRecycler(org.opensearch.common.util.MockPageCacheRecycler) DateFormatter(org.opensearch.common.time.DateFormatter) Client(org.opensearch.client.Client) HyperLogLogPlusPlus(org.opensearch.search.aggregations.metrics.HyperLogLogPlusPlus) Clusters(org.opensearch.action.search.SearchResponse.Clusters) BytesRef(org.apache.lucene.util.BytesRef) SearchHit(org.opensearch.search.SearchHit) Collection(java.util.Collection) Feature(org.opensearch.ad.model.Feature) Settings(org.opensearch.common.settings.Settings) StandardCharsets(java.nio.charset.StandardCharsets) InvocationTargetException(java.lang.reflect.InvocationTargetException) CountDownLatch(java.util.concurrent.CountDownLatch) List(java.util.List) LinearUniformInterpolator(org.opensearch.ad.dataprocessor.LinearUniformInterpolator) Logger(org.apache.logging.log4j.Logger) TestHelpers(org.opensearch.ad.TestHelpers) Entry(java.util.Map.Entry) Optional(java.util.Optional) Mockito.mock(org.mockito.Mockito.mock) InternalDateRange(org.opensearch.search.aggregations.bucket.range.InternalDateRange) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) BucketOrder(org.opensearch.search.aggregations.BucketOrder) InternalFilter(org.opensearch.search.aggregations.bucket.filter.InternalFilter) StringTerms(org.opensearch.search.aggregations.bucket.terms.StringTerms) DocValueFormat(org.opensearch.search.DocValueFormat) AggregatorFactories(org.opensearch.search.aggregations.AggregatorFactories) HashMap(java.util.HashMap) Aggregations(org.opensearch.search.aggregations.Aggregations) AbstractHyperLogLogPlusPlus(org.opensearch.search.aggregations.metrics.AbstractHyperLogLogPlusPlus) SearchHits(org.opensearch.search.SearchHits) SimpleImmutableEntry(java.util.AbstractMap.SimpleImmutableEntry) BitMixer(com.carrotsearch.hppc.BitMixer) Constructor(java.lang.reflect.Constructor) AnomalyDetectorSettings(org.opensearch.ad.settings.AnomalyDetectorSettings) InternalOrder(org.opensearch.search.aggregations.InternalOrder) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Answer(org.mockito.stubbing.Answer) InvocationOnMock(org.mockito.invocation.InvocationOnMock) ArgumentCaptor(org.mockito.ArgumentCaptor) ImmutableList(com.google.common.collect.ImmutableList) AnomalyDetector(org.opensearch.ad.model.AnomalyDetector) SearchRequest(org.opensearch.action.search.SearchRequest) SearchResponse(org.opensearch.action.search.SearchResponse) ClusterSettings(org.opensearch.common.settings.ClusterSettings) InternalCardinality(org.opensearch.search.aggregations.metrics.InternalCardinality) QueryBuilders(org.opensearch.index.query.QueryBuilders) AbstractHyperLogLog(org.opensearch.search.aggregations.metrics.AbstractHyperLogLog) ClientUtil(org.opensearch.ad.util.ClientUtil) IOException(java.io.IOException) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) CompositeAggregation(org.opensearch.search.aggregations.bucket.composite.CompositeAggregation) InternalSearchResponse(org.opensearch.search.internal.InternalSearchResponse) Mockito.verify(org.mockito.Mockito.verify) TimeUnit(java.util.concurrent.TimeUnit) TotalHits(org.apache.lucene.search.TotalHits) InternalFilters(org.opensearch.search.aggregations.bucket.filter.InternalFilters) ChronoUnit(java.time.temporal.ChronoUnit) Entity(org.opensearch.ad.model.Entity) SearchResponseSections(org.opensearch.action.search.SearchResponseSections) DateFieldMapper(org.opensearch.index.mapper.DateFieldMapper) TermsAggregationBuilder(org.opensearch.search.aggregations.bucket.terms.TermsAggregationBuilder) ShardSearchFailure(org.opensearch.action.search.ShardSearchFailure) InternalBucket(org.opensearch.search.aggregations.bucket.filter.InternalFilters.InternalBucket) ClusterService(org.opensearch.cluster.service.ClusterService) Clock(java.time.Clock) IntervalTimeConfiguration(org.opensearch.ad.model.IntervalTimeConfiguration) Collections(java.util.Collections) LogManager(org.apache.logging.log4j.LogManager) SumAggregationBuilder(org.opensearch.search.aggregations.metrics.SumAggregationBuilder) Entity(org.opensearch.ad.model.Entity) CompositeAggregation(org.opensearch.search.aggregations.bucket.composite.CompositeAggregation) SearchResponseSections(org.opensearch.action.search.SearchResponseSections) InternalAggregations(org.opensearch.search.aggregations.InternalAggregations) Aggregations(org.opensearch.search.aggregations.Aggregations) CountDownLatch(java.util.concurrent.CountDownLatch) SearchResponse(org.opensearch.action.search.SearchResponse) InternalSearchResponse(org.opensearch.search.internal.InternalSearchResponse) InternalBucket(org.opensearch.search.aggregations.bucket.filter.InternalFilters.InternalBucket) List(java.util.List) ArrayList(java.util.ArrayList) ImmutableList(com.google.common.collect.ImmutableList)

Example 4 with ClientUtil

use of org.opensearch.ad.util.ClientUtil in project anomaly-detection by opensearch-project.

the class NoPowermockSearchFeatureDaoTests method setUp.

@Override
public void setUp() throws Exception {
    super.setUp();
    serviceField = "service";
    hostField = "host";
    detector = mock(AnomalyDetector.class);
    when(detector.isMultientityDetector()).thenReturn(true);
    when(detector.getCategoryField()).thenReturn(Arrays.asList(new String[] { serviceField, hostField }));
    detectorId = "123";
    when(detector.getDetectorId()).thenReturn(detectorId);
    when(detector.getTimeField()).thenReturn("testTimeField");
    when(detector.getIndices()).thenReturn(Arrays.asList("testIndices"));
    IntervalTimeConfiguration detectionInterval = new IntervalTimeConfiguration(1, ChronoUnit.MINUTES);
    when(detector.getDetectionInterval()).thenReturn(detectionInterval);
    when(detector.getFilterQuery()).thenReturn(QueryBuilders.matchAllQuery());
    client = mock(Client.class);
    interpolator = new LinearUniformInterpolator(new SingleFeatureLinearUniformInterpolator());
    clientUtil = mock(ClientUtil.class);
    settings = Settings.EMPTY;
    ClusterSettings clusterSettings = new ClusterSettings(Settings.EMPTY, Collections.unmodifiableSet(new HashSet<>(Arrays.asList(AnomalyDetectorSettings.MAX_ENTITIES_FOR_PREVIEW, AnomalyDetectorSettings.PAGE_SIZE))));
    clusterService = mock(ClusterService.class);
    when(clusterService.getClusterSettings()).thenReturn(clusterSettings);
    clock = mock(Clock.class);
    searchFeatureDao = new SearchFeatureDao(client, // Important. Without this, ParseUtils cannot parse anything
    xContentRegistry(), interpolator, clientUtil, settings, clusterService, AnomalyDetectorSettings.NUM_SAMPLES_PER_TREE, clock, 1, 1, 60_000L);
    String app0 = "app_0";
    String server1 = "server_1";
    attrs1 = new HashMap<>();
    attrs1.put(serviceField, app0);
    attrs1.put(hostField, server1);
    String server2 = "server_2";
    attrs1 = new HashMap<>();
    attrs1.put(serviceField, app0);
    attrs1.put(hostField, server2);
}
Also used : ClusterSettings(org.opensearch.common.settings.ClusterSettings) ClientUtil(org.opensearch.ad.util.ClientUtil) IntervalTimeConfiguration(org.opensearch.ad.model.IntervalTimeConfiguration) Clock(java.time.Clock) AnomalyDetector(org.opensearch.ad.model.AnomalyDetector) SingleFeatureLinearUniformInterpolator(org.opensearch.ad.dataprocessor.SingleFeatureLinearUniformInterpolator) ClusterService(org.opensearch.cluster.service.ClusterService) SingleFeatureLinearUniformInterpolator(org.opensearch.ad.dataprocessor.SingleFeatureLinearUniformInterpolator) LinearUniformInterpolator(org.opensearch.ad.dataprocessor.LinearUniformInterpolator) Client(org.opensearch.client.Client) HashSet(java.util.HashSet)

Example 5 with ClientUtil

use of org.opensearch.ad.util.ClientUtil in project anomaly-detection by opensearch-project.

the class CheckpointDaoTests method test_batch_write_no_init.

@SuppressWarnings("unchecked")
public void test_batch_write_no_init() throws InterruptedException {
    when(indexUtil.doesCheckpointIndexExist()).thenReturn(true);
    doAnswer(invocation -> {
        ActionListener<BulkResponse> listener = invocation.getArgument(2);
        listener.onResponse(createBulkResponse(2, 0, null));
        return null;
    }).when(clientUtil).execute(eq(BulkAction.INSTANCE), any(BulkRequest.class), any(ActionListener.class));
    final CountDownLatch processingLatch = new CountDownLatch(1);
    checkpointDao.batchWrite(new BulkRequest(), ActionListener.wrap(response -> processingLatch.countDown(), e -> {
        assertTrue(false);
    }));
    // we don't expect the waiting time elapsed before the count reached zero
    assertTrue(processingLatch.await(100, TimeUnit.SECONDS));
    verify(clientUtil, times(1)).execute(any(), any(), any());
}
Also used : Arrays(java.util.Arrays) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) ThresholdedRandomCutForestMapper(com.amazon.randomcutforest.parkservices.state.ThresholdedRandomCutForestMapper) ActionRequest(org.opensearch.action.ActionRequest) BulkAction(org.opensearch.action.bulk.BulkAction) GsonBuilder(com.google.gson.GsonBuilder) Mockito.doThrow(org.mockito.Mockito.doThrow) MockitoAnnotations(org.mockito.MockitoAnnotations) Pair(org.apache.commons.lang3.tuple.Pair) V1JsonToV2StateConverter(com.amazon.randomcutforest.serialize.json.v1.V1JsonToV2StateConverter) Mockito.doAnswer(org.mockito.Mockito.doAnswer) Map(java.util.Map) ZoneOffset(java.time.ZoneOffset) ActionListener(org.opensearch.action.ActionListener) Mockito.doReturn(org.mockito.Mockito.doReturn) DeleteRequest(org.opensearch.action.delete.DeleteRequest) MultiGetAction(org.opensearch.action.get.MultiGetAction) Client(org.opensearch.client.Client) Set(java.util.Set) Matchers.any(org.mockito.Matchers.any) RandomCutForest(com.amazon.randomcutforest.RandomCutForest) CountDownLatch(java.util.concurrent.CountDownLatch) UPDATED(org.opensearch.action.DocWriteResponse.Result.UPDATED) ThresholdedRandomCutForestState(com.amazon.randomcutforest.parkservices.state.ThresholdedRandomCutForestState) Logger(org.apache.logging.log4j.Logger) MLUtil(test.org.opensearch.ad.util.MLUtil) DocWriteResponse(org.opensearch.action.DocWriteResponse) UpdateRequest(org.opensearch.action.update.UpdateRequest) AccessController(java.security.AccessController) Mockito.mock(org.mockito.Mockito.mock) Mock(org.mockito.Mock) UpdateResponse(org.opensearch.action.update.UpdateResponse) DocWriteRequest(org.opensearch.action.DocWriteRequest) FIELD_MODELV2(org.opensearch.ad.ml.CheckpointDao.FIELD_MODELV2) Mockito.spy(org.mockito.Mockito.spy) AnomalyDetectorSettings(org.opensearch.ad.settings.AnomalyDetectorSettings) DefaultPooledObject(org.apache.commons.pool2.impl.DefaultPooledObject) BiConsumer(java.util.function.BiConsumer) DeleteResponse(org.opensearch.action.delete.DeleteResponse) Before(org.junit.Before) CommonName(org.opensearch.ad.constant.CommonName) Mockito.times(org.mockito.Mockito.times) IOException(java.io.IOException) File(java.io.File) Mockito.never(org.mockito.Mockito.never) MultiGetItemResponse(org.opensearch.action.get.MultiGetItemResponse) BufferedReader(java.io.BufferedReader) MultiGetRequest(org.opensearch.action.get.MultiGetRequest) BasePooledObjectFactory(org.apache.commons.pool2.BasePooledObjectFactory) MultiGetResponse(org.opensearch.action.get.MultiGetResponse) URISyntaxException(java.net.URISyntaxException) PooledObject(org.apache.commons.pool2.PooledObject) BulkRequest(org.opensearch.action.bulk.BulkRequest) Random(java.util.Random) BulkItemResponse(org.opensearch.action.bulk.BulkItemResponse) Gson(com.google.gson.Gson) RandomModelStateConfig(test.org.opensearch.ad.util.RandomModelStateConfig) RandomCutForestMapper(com.amazon.randomcutforest.state.RandomCutForestMapper) GetResponse(org.opensearch.action.get.GetResponse) OpenSearchTestCase(org.opensearch.test.OpenSearchTestCase) GenericObjectPool(org.apache.commons.pool2.impl.GenericObjectPool) PrivilegedAction(java.security.PrivilegedAction) Instant(java.time.Instant) FileNotFoundException(java.io.FileNotFoundException) OffsetDateTime(java.time.OffsetDateTime) Entry(java.util.Map.Entry) Optional(java.util.Optional) ResourceAlreadyExistsException(org.opensearch.ResourceAlreadyExistsException) ReplicationResponse(org.opensearch.action.support.replication.ReplicationResponse) Queue(java.util.Queue) JsonDeserializer(test.org.opensearch.ad.util.JsonDeserializer) Precision(com.amazon.randomcutforest.config.Precision) HashMap(java.util.HashMap) AtomicReference(java.util.concurrent.atomic.AtomicReference) HashSet(java.util.HashSet) ArgumentCaptor(org.mockito.ArgumentCaptor) Schema(io.protostuff.Schema) FIELD_MODEL(org.opensearch.ad.ml.CheckpointDao.FIELD_MODEL) NoSuchElementException(java.util.NoSuchElementException) Answers(org.mockito.Answers) ClientUtil(org.opensearch.ad.util.ClientUtil) TIMESTAMP(org.opensearch.ad.ml.CheckpointDao.TIMESTAMP) Month(java.time.Month) VersionConflictEngineException(org.opensearch.index.engine.VersionConflictEngineException) IndexNotFoundException(org.opensearch.index.IndexNotFoundException) GetRequest(org.opensearch.action.get.GetRequest) AnomalyDetectionIndices(org.opensearch.ad.indices.AnomalyDetectionIndices) RuntimeSchema(io.protostuff.runtime.RuntimeSchema) Mockito.when(org.mockito.Mockito.when) CreateIndexResponse(org.opensearch.action.admin.indices.create.CreateIndexResponse) LinkedBuffer(io.protostuff.LinkedBuffer) Mockito.verify(org.mockito.Mockito.verify) TimeUnit(java.util.concurrent.TimeUnit) ShardId(org.opensearch.index.shard.ShardId) BulkResponse(org.opensearch.action.bulk.BulkResponse) ThresholdedRandomCutForest(com.amazon.randomcutforest.parkservices.ThresholdedRandomCutForest) Clock(java.time.Clock) FileReader(java.io.FileReader) IndexRequest(org.opensearch.action.index.IndexRequest) LogManager(org.apache.logging.log4j.LogManager) ActionListener(org.opensearch.action.ActionListener) BulkRequest(org.opensearch.action.bulk.BulkRequest) BulkResponse(org.opensearch.action.bulk.BulkResponse) CountDownLatch(java.util.concurrent.CountDownLatch)

Aggregations

ClientUtil (org.opensearch.ad.util.ClientUtil)20 Client (org.opensearch.client.Client)14 Clock (java.time.Clock)13 ActionListener (org.opensearch.action.ActionListener)12 GetResponse (org.opensearch.action.get.GetResponse)9 IOException (java.io.IOException)8 HashMap (java.util.HashMap)8 Before (org.junit.Before)8 GetRequest (org.opensearch.action.get.GetRequest)8 AnomalyDetectionIndices (org.opensearch.ad.indices.AnomalyDetectionIndices)8 ThresholdedRandomCutForestMapper (com.amazon.randomcutforest.parkservices.state.ThresholdedRandomCutForestMapper)7 V1JsonToV2StateConverter (com.amazon.randomcutforest.serialize.json.v1.V1JsonToV2StateConverter)7 RandomCutForestMapper (com.amazon.randomcutforest.state.RandomCutForestMapper)7 Arrays (java.util.Arrays)7 Map (java.util.Map)7 Entry (java.util.Map.Entry)7 Optional (java.util.Optional)7 CountDownLatch (java.util.concurrent.CountDownLatch)7 GenericObjectPool (org.apache.commons.pool2.impl.GenericObjectPool)7 LogManager (org.apache.logging.log4j.LogManager)7