Examples of ClearIndicesCacheResponse


Examples of org.elasticsearch.action.admin.indices.cache.clear.ClearIndicesCacheResponse

        logger.info("--> index exists?, fake index");
        indicesExistsResponse = client1.admin().indices().prepareExists("test1234565").execute().actionGet();
        assertThat(indicesExistsResponse.exists(), equalTo(false));

        logger.info("Clearing cache");
        ClearIndicesCacheResponse clearIndicesCacheResponse = client1.admin().indices().clearCache(clearIndicesCacheRequest("test")).actionGet();
        assertThat(clearIndicesCacheResponse.successfulShards(), equalTo(10));
        assertThat(clearIndicesCacheResponse.failedShards(), equalTo(0));

        logger.info("Optimizing");
        OptimizeResponse optimizeResponse = client1.admin().indices().prepareOptimize("test").execute().actionGet();
        assertThat(optimizeResponse.successfulShards(), equalTo(10));
        assertThat(optimizeResponse.failedShards(), equalTo(0));
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.cache.clear.ClearIndicesCacheResponse

        assertThat(indexExists(getConcreteIndexName()), equalTo(true));
        logger.info("--> index exists?, fake index");
        assertThat(indexExists("test1234565"), equalTo(false));

        logger.info("Clearing cache");
        ClearIndicesCacheResponse clearIndicesCacheResponse = client().admin().indices().clearCache(clearIndicesCacheRequest("test").recycler(true).fieldDataCache(true).filterCache(true).idCache(true)).actionGet();
        assertNoFailures(clearIndicesCacheResponse);
        assertThat(clearIndicesCacheResponse.getSuccessfulShards(), equalTo(numShards.totalNumShards));

        logger.info("Optimizing");
        waitForRelocation(ClusterHealthStatus.GREEN);
        OptimizeResponse optimizeResponse = optimize();
        assertThat(optimizeResponse.getSuccessfulShards(), equalTo(numShards.totalNumShards));
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.