Examples of RiverName


Examples of org.elasticsearch.river.RiverName

    }

    @Test
    public void testLoadMongoDBRiverDefinitionIssue307IsMongosTrue() {
        try {
            RiverName riverName = new RiverName("mongodb", "mongodb-" + System.currentTimeMillis());
            InputStream in = getClass().getResourceAsStream("/org/elasticsearch/river/mongodb/test-mongodb-river-definition-307.json");
            RiverSettings riverSettings = new RiverSettings(ImmutableSettings.settingsBuilder().build(), XContentHelper.convertToMap(
                    Streams.copyToByteArray(in), false).v2());
            ScriptService scriptService = null;
            MongoDBRiverDefinition definition = MongoDBRiverDefinition.parseSettings(riverName.name(),
                    RiverIndexName.Conf.DEFAULT_INDEX_NAME, riverSettings, scriptService);
            Assert.assertNotNull(definition);
            Assert.assertTrue(definition.isMongos());
        } catch (Throwable t) {
            Assert.fail("testLoadMongoDBRiverDefinitionIssue307IsMongosTrue failed", t);
View Full Code Here

Examples of org.elasticsearch.river.RiverName

    }

    @Test
    public void testLoadMongoDBRiverDefinitionIssue307IsMongosNull() {
        try {
            RiverName riverName = new RiverName("mongodb", "mongodb-" + System.currentTimeMillis());
            InputStream in = getClass().getResourceAsStream("/org/elasticsearch/river/mongodb/test-mongodb-river-definition.json");
            RiverSettings riverSettings = new RiverSettings(ImmutableSettings.settingsBuilder().build(), XContentHelper.convertToMap(
                    Streams.copyToByteArray(in), false).v2());
            ScriptService scriptService = null;
            MongoDBRiverDefinition definition = MongoDBRiverDefinition.parseSettings(riverName.name(),
                    RiverIndexName.Conf.DEFAULT_INDEX_NAME, riverSettings, scriptService);
            Assert.assertNotNull(definition);
            Assert.assertNull(definition.isMongos());
        } catch (Throwable t) {
            Assert.fail("testLoadMongoDBRiverDefinitionIssue307IsMongosNull failed", t);
View Full Code Here

Examples of org.elasticsearch.river.RiverName

    }

    @Test
    public void testLoadMongoDBRiverDefinitionStoreStatistics() {
        try {
            RiverName riverName = new RiverName("mongodb", "mongodb-" + System.currentTimeMillis());
            InputStream in = getClass().getResourceAsStream("/org/elasticsearch/river/mongodb/test-mongodb-river-definition-store-statistics.json");
            RiverSettings riverSettings = new RiverSettings(ImmutableSettings.settingsBuilder().build(), XContentHelper.convertToMap(
                    Streams.copyToByteArray(in), false).v2());
            ScriptService scriptService = null;
            MongoDBRiverDefinition definition = MongoDBRiverDefinition.parseSettings(riverName.name(),
                    RiverIndexName.Conf.DEFAULT_INDEX_NAME, riverSettings, scriptService);
            Assert.assertNotNull(definition);
            Assert.assertTrue(definition.isStoreStatistics());
            Assert.assertEquals(definition.getStatisticsIndexName(), "archive-stats");
            Assert.assertEquals(definition.getStatisticsTypeName(), "dummy-stats");
View Full Code Here

Examples of org.elasticsearch.river.RiverName

        return routing;
    }

    @Override
    public void readFrom(StreamInput in) throws IOException {
        riverName = new RiverName(in.readString(), in.readString());
        if (in.readBoolean()) {
            node = DiscoveryNode.readNode(in);
        }
    }
View Full Code Here

Examples of org.elasticsearch.river.RiverName

                        String riverType = XContentMapValues.nodeStringValue(getResponse.getSourceAsMap().get("type"), null);
                        if (riverType == null) {
                            logger.warn("no river type provided for [{}], ignoring...", riverIndexName);
                        } else {
                            routingBuilder.put(new RiverRouting(new RiverName(riverType, mappingType), null));
                            dirty = true;
                        }
                    } else {
                        // At least one type does not have _meta
                        metaFound = false;
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.