Package org.elasticsearch.common.settings

Examples of org.elasticsearch.common.settings.Settings$Builder


    /**
     * Constructor.  Initialize elastic and create the index/mapping
     */
    public ParentChildStressTest() {
        NodeBuilder nodeBuilder = NodeBuilder.nodeBuilder();
        Settings settings = nodeBuilder.settings()
                .build();
        this.elasticNode = nodeBuilder.settings(settings).client(true).node();
        this.client = this.elasticNode.client();

        String mapping =
View Full Code Here


    }

    public static void main(String[] args) throws Exception {
        System.setProperty("es.logger.prefix", "");

        Settings settings = settingsBuilder()
                .put("index.shard.check_index", true)
                .put("gateway.type", "none")
                .build();

        RollingRestartStressTest test = new RollingRestartStressTest()
View Full Code Here

*/
public class ConcurrentIndexingVersioningTest {

    public static void main(String[] args) throws Exception {

        Settings settings = settingsBuilder()
                .put("gateway.type", "none")
                .build();

        Node node1 = nodeBuilder().settings(settings).node();
        Node node2 = nodeBuilder().settings(settings).node();
View Full Code Here

    public static void main(String[] args) {
        final int NUMBER_OF_NODES = 4;
        final int NUMBER_OF_INDICES = 600;
        final int BATCH = 300;

        final Settings nodeSettings = ImmutableSettings.settingsBuilder().put("index.number_of_shards", 2).build();

        Node[] nodes = new Node[NUMBER_OF_NODES];
        for (int i = 0; i < nodes.length; i++) {
            nodes[i] = NodeBuilder.nodeBuilder().settings(nodeSettings).node();
        }
View Full Code Here

        System.out.println("********** DONE, indexed [" + indexCounter.get() + "], searched [" + searchCounter.get() + "]");
    }

    public static void main(String[] args) throws Exception {
        Settings settings = ImmutableSettings.settingsBuilder()
                .put("gateway.type", "none")
                .build();

        Search1StressTest test = new Search1StressTest()
                .setPeriod(TimeValue.timeValueMinutes(10))
View Full Code Here

        final int NUM_NODES = 40;
        final int NUM_INDICES = 100;
        final int NUM_DOCS = 2;
        final int FLUSH_AFTER = 1;

        final Settings nodeSettings = ImmutableSettings.settingsBuilder()
                .put("transport.netty.connections_per_node.low", 0)
                .put("transport.netty.connections_per_node.med", 0)
                .put("transport.netty.connections_per_node.high", 1)
                .build();

        final Settings indexSettings = ImmutableSettings.settingsBuilder()
                .put("index.number_of_shards", 1)
                .build();

        List<Node> nodes = Lists.newArrayList();
        for (int i = 0; i < NUM_NODES; i++) {
View Full Code Here

        System.setProperty("es.logger.prefix", "");

        int numberOfIndices = 100;
        int numberOfDocs = 100;

        Settings settings = ImmutableSettings.settingsBuilder()
                .put("index.shard.check_index", false)
                .put("gateway.type", "fs")
                .put("index.number_of_shards", 1)
                .build();
        Node node = NodeBuilder.nodeBuilder().settings(settings).node();
View Full Code Here

    public static void main(String[] args) throws Exception {
        System.setProperty("es.logger.prefix", "");

        int numberOfNodes = 2;
        Settings settings = ImmutableSettings.settingsBuilder()
                .put("index.shard.check_index", true)
                .put("gateway.type", "local")
                .put("gateway.recover_after_nodes", numberOfNodes)
                .put("index.number_of_shards", 1)
                .build();
View Full Code Here

        }
    }

    public static void main(String[] args) throws Exception {
        ShardId shardId = new ShardId(new Index("index"), 1);
        Settings settings = EMPTY_SETTINGS;

//        Store store = new RamStore(shardId, settings);
        Store store = new ByteBufferStore(shardId, settings, null, new ByteBufferCache(settings));
//        Store store = new NioFsStore(shardId, settings);
View Full Code Here

        return buildNode(id, settings.build());
    }

    public Node buildNode(String id, Settings settings) {
        String settingsSource = getClass().getName().replace('.', '/') + ".yml";
        Settings finalSettings = settingsBuilder()
                .loadFromClasspath(settingsSource)
                .put(defaultSettings)
                .put(settings)
                .put("name", id)
                .build();

        if (finalSettings.get("gateway.type") == null) {
            // default to non gateway
            finalSettings = settingsBuilder().put(finalSettings).put("gateway.type", "none").build();
        }

        Node node = nodeBuilder()
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.settings.Settings$Builder

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.