Examples of warmers()


Examples of org.elasticsearch.action.admin.indices.get.GetIndexResponse.warmers()

        ensureSearchable("test");
        assertAcked(client().admin().indices().preparePutWarmer("warmer1").setSearchRequest(client().prepareSearch("test")).get());
        ensureSearchable("test");
        GetIndexResponse getIndexResponse = client().admin().indices().prepareGetIndex().addIndices("test").addFeatures("_warmers")
                .execute().actionGet();
        ImmutableOpenMap<String, ImmutableList<Entry>> warmersMap = getIndexResponse.warmers();
        assertThat(warmersMap, notNullValue());
        assertThat(warmersMap.size(), equalTo(1));
        ImmutableList<Entry> warmersList = warmersMap.get("test");
        assertThat(warmersList, notNullValue());
        assertThat(warmersList.size(), equalTo(1));
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.warmer.get.GetWarmersResponse.warmers()

        assertAcked(client().admin().indices().preparePutWarmer("custom_warmer")
                .setSearchRequest(client().prepareSearch("test").setTypes("test").setQuery(QueryBuilders.matchAllQuery())));

        for (Client client : clients()) {
            GetWarmersResponse getWarmersResponse = client.admin().indices().prepareGetWarmers().setLocal(true).get();
            assertThat(getWarmersResponse.warmers().size(), equalTo(1));
            ObjectObjectCursor<String, ImmutableList<IndexWarmersMetaData.Entry>> entry = getWarmersResponse.warmers().iterator().next();
            assertThat(entry.key, equalTo("test"));
            assertThat(entry.value.size(), equalTo(1));
            assertThat(entry.value.get(0).name(), equalTo("custom_warmer"));
        }
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.warmer.get.GetWarmersResponse.warmers()

                .setSearchRequest(client().prepareSearch("test").setTypes("test").setQuery(QueryBuilders.matchAllQuery())));

        for (Client client : clients()) {
            GetWarmersResponse getWarmersResponse = client.admin().indices().prepareGetWarmers().setLocal(true).get();
            assertThat(getWarmersResponse.warmers().size(), equalTo(1));
            ObjectObjectCursor<String, ImmutableList<IndexWarmersMetaData.Entry>> entry = getWarmersResponse.warmers().iterator().next();
            assertThat(entry.key, equalTo("test"));
            assertThat(entry.value.size(), equalTo(1));
            assertThat(entry.value.get(0).name(), equalTo("custom_warmer"));
        }
    }
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.warmer.get.GetWarmersResponse.warmers()

        assertTrue(awaitBusy(new Predicate<Object>() {
            @Override
            public boolean apply(Object input) {
                for (Client client : clients()) {
                    GetWarmersResponse getWarmersResponse = client.admin().indices().prepareGetWarmers().setLocal(true).get();
                    if (getWarmersResponse.warmers().size() != 1) {
                        return false;
                    }
                }
                return true;
            }
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.warmer.get.GetWarmersResponse.warmers()

        assertAcked(client().admin().indices().prepareDeleteWarmer().setIndices("test").setNames("custom_warmer"));

        for (Client client : clients()) {
            GetWarmersResponse getWarmersResponse = client.admin().indices().prepareGetWarmers().setLocal(true).get();
            assertThat(getWarmersResponse.warmers().size(), equalTo(0));
        }
    }

    @Test
    public void testDeleteWarmerNoAcknowledgement() throws InterruptedException {
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.warmer.get.GetWarmersResponse.warmers()

        assertTrue(awaitBusy(new Predicate<Object>() { // wait until they are all deleted
            @Override
            public boolean apply(Object input) {
                for (Client client : clients()) {
                    GetWarmersResponse getWarmersResponse = client.admin().indices().prepareGetWarmers().setLocal(true).get();
                    if (getWarmersResponse.warmers().size() > 0) {
                        return false;
                    }
                }
                return true;
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.