Package com.github.tlrx.elasticsearch.test

Examples of com.github.tlrx.elasticsearch.test.EsSetup


    @Before
    public void setUp() {

        // Instantiates a local node & client with few templates in config dir
        esSetup = new EsSetup(ImmutableSettings
                                .settingsBuilder()
                                    .put("path.conf", "./target/test-classes/org/elasticsearch/test/integration/views/config/")
                                    .build());

        // Clean all and create test org.elasticsearch.test.integration.views.mappings.data
View Full Code Here


    @Before
    public void setUp() {

        // Instantiates a local node & client with few templates in config dir
        esSetup = new EsSetup(ImmutableSettings
                                .settingsBuilder()
                                    .put("path.conf", "./target/test-classes/org/elasticsearch/test/integration/views/config/")
                                    .build());

        // Clean all and create test org.elasticsearch.test.integration.views.mappings.data
View Full Code Here

    headers.clear();

    // Instantiates a local node & client

    esSetup = new EsSetup(settingsBuilder.build());

    // Clean all, and creates some indices

    esSetup.execute(
View Full Code Here

        return metrics;
    }

    @Before
    public void setup() throws IOException {
        esSetup = new EsSetup();
        esSetup.execute(EsSetup.deleteAll());
        esSetup.execute(EsSetup.createIndex(ElasticIO.INDEX_NAME).withMapping("metrics", EsSetup.fromClassPath("metrics_mapping.json")));
        elasticIO = new ElasticIO(esSetup.client());

        elasticIO.insertDiscovery(createTestMetrics(TENANT_A));
View Full Code Here

            dumpDir.delete();
        }
        dumpDir.mkdir();

        // Prepare a second node and wait for relocation
        esSetup2 = new EsSetup();
        esSetup2.execute(index("users", "d").withSource("{\"name\": \"motorbike\"}"));
        esSetup2.client().admin().cluster().prepareHealth().setWaitForGreenStatus().
            setWaitForNodes("2").setWaitForRelocatingShards(0).execute().actionGet();

        // Do dump request
View Full Code Here

    protected EsSetup esSetup, esSetup2;

    @Before
    public void setUp() {
        esSetup = new EsSetup();
        esSetup.execute(deleteAll(), createIndex("users").withSettings(
                fromClassPath("essetup/settings/test_a.json")).withMapping("d",
                        fromClassPath("essetup/mappings/test_a.json")).withData(
                                fromClassPath("essetup/data/test_a.json")));
        esSetup.client().admin().indices().prepareRefresh("users").execute();
View Full Code Here

    /**
     * Set up a second node and wait for green status
     */
    protected void setUpSecondNode() {
        esSetup2 = new EsSetup();
        esSetup2.execute(deleteAll());
        esSetup2.client().admin().cluster().prepareHealth().setWaitForGreenStatus().execute().actionGet();
    }
View Full Code Here

     * Export request must also work with multiple nodes.
     */
    @Test
    public void testWithMultipleNodes() {
        // Prepare a second node and wait for relocation
        esSetup2 = new EsSetup();
        esSetup2.execute(index("users", "d").withSource("{\"name\": \"motorbike\"}"));
        esSetup2.client().admin().cluster().prepareHealth().setWaitForGreenStatus().
            setWaitForNodes("2").setWaitForRelocatingShards(0).execute().actionGet();

        // Do export request
View Full Code Here

     * If the path of the output file is relative, the files are put to the data directory
     * of each node in a sub directory /export .
     */
    @Test
    public void testExportRelativeFilename() {
        esSetup2 = new EsSetup();
        esSetup2.execute(index("users", "d").withSource("{\"name\": \"motorbike\"}"));
        esSetup2.client().admin().cluster().prepareHealth().setWaitForGreenStatus().
            setWaitForNodes("2").setWaitForRelocatingShards(0).execute().actionGet();

        ExportResponse response = executeExportRequest(
View Full Code Here

TOP

Related Classes of com.github.tlrx.elasticsearch.test.EsSetup

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.