Package org.elasticsearch.gateway

Examples of org.elasticsearch.gateway.Gateway$GatewayStateRecoveredListener


            assertHitCount(client().prepareSearch().setQuery(matchAllQuery()).get(), 1l);
        }
        assertThat(client().prepareGet("test", "type1", "1").execute().actionGet().isExists(), equalTo(true));

        logger.info("--> restarting the nodes");
        final Gateway gateway1 = internalCluster().getInstance(Gateway.class, node_1);
        internalCluster().fullRestart(new RestartCallback() {
            @Override
            public Settings onNodeStopped(String nodeName) throws Exception {
                if (node_1.equals(nodeName)) {
                    logger.info("--> deleting the data for the first node");
                    gateway1.reset();
                }
                return null;
            }
        });
View Full Code Here


            assertHitCount(client().prepareSearch().setQuery(matchAllQuery()).get(), 1l);
        }
        assertThat(client().prepareGet("test", "type1", "1").execute().actionGet().isExists(), equalTo(true));

        logger.info("--> restarting the nodes");
        final Gateway gateway1 = internalCluster().getInstance(Gateway.class, node_1);
        internalCluster().fullRestart(new RestartCallback() {
            @Override
            public Settings onNodeStopped(String nodeName) throws Exception {
                if (node_1.equals(nodeName)) {
                    logger.info("--> deleting the data for the first node");
                    gateway1.reset();
                }
                return null;
            }
        });
View Full Code Here

            assertHitCount(client().prepareCount().setQuery(matchAllQuery()).get(), 1l);
        }
        assertThat(client().prepareGet("test", "type1", "1").execute().actionGet().isExists(), equalTo(true));

        logger.info("--> restarting the nodes");
        final Gateway gateway1 = internalCluster().getInstance(Gateway.class, node_1);
        internalCluster().fullRestart(new RestartCallback() {

            @Override
            public Settings onNodeStopped(String nodeName) throws Exception {
                if (node_1.equals(nodeName)) {
                    logger.info("--> deleting the data for the first node");
                    gateway1.reset();
                }
                return null;
            }
        });
View Full Code Here

        for (int i = 0; i < 10; i++) {
            assertHitCount(client().prepareSearch().setQuery(matchAllQuery()).get(), 1l);
        }

        logger.info("--> restarting the nodes");
        final Gateway gateway1 = internalCluster().getInstance(Gateway.class, node_1);
        internalCluster().fullRestart(new RestartCallback() {

            @Override
            public Settings onNodeStopped(String nodeName) throws Exception {
                if (node_1.equals(nodeName)) {
                    logger.info("--> deleting the data for the first node");
                    gateway1.reset();
                }
                return null;
            }
        });
View Full Code Here

TOP

Related Classes of org.elasticsearch.gateway.Gateway$GatewayStateRecoveredListener

Copyright © 2018 www.massapicom. 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.