Examples of injector()


Examples of org.elasticsearch.node.internal.InternalNode.injector()

        assertThat(shardDirectory("server3", "test", 0).exists(), equalTo(true));
    }

    private File shardDirectory(String server, String index, int shard) {
        InternalNode node = ((InternalNode) node(server));
        NodeEnvironment env = node.injector().getInstance(NodeEnvironment.class);
        return env.shardLocation(new ShardId(index, shard));
    }


}
View Full Code Here

Examples of org.elasticsearch.node.internal.InternalNode.injector()

  private Settings toDynamicSettings(Settings settings) {
    // FIXME TransportClient?
    InternalNode node = (InternalNode) ((NodeClient) getClient()).getNode();

    DynamicSettings indexDynamicSettings = node.injector().getInstance(DynamicSettingsBean.class)
        .getIndexDynamicSettings();

    ImmutableSettings.Builder dynamicSettings = ImmutableSettings.builder();

    for (Map.Entry<String, String> e : settings.getAsMap().entrySet()) {
View Full Code Here

Examples of org.elasticsearch.node.internal.InternalNode.injector()

                        .put("index.store.type", "ram")
                        .put("config.ignore_system_properties", true)
                        .put("gateway.type", "none")).build();
        node.start();

        SQLService sqlService = node.injector().getInstance(SQLService.class);
        TransportSQLAction transportSQLAction = node.injector().getInstance(TransportSQLAction.class);
        transportSQLAction.execute(new SQLRequest("select name from sys.cluster")).actionGet();

        sqlService.disable();
View Full Code Here

Examples of org.elasticsearch.node.internal.InternalNode.injector()

                        .put("config.ignore_system_properties", true)
                        .put("gateway.type", "none")).build();
        node.start();

        SQLService sqlService = node.injector().getInstance(SQLService.class);
        TransportSQLAction transportSQLAction = node.injector().getInstance(TransportSQLAction.class);
        transportSQLAction.execute(new SQLRequest("select name from sys.cluster")).actionGet();

        sqlService.disable();

        try {
View Full Code Here

Examples of org.elasticsearch.node.internal.InternalNode.injector()

                    final String id = parts[3];
                    final String routing = "null".equals(parts[4]) ? null : parts[4];
                    final int pre20ExpectedShardId = Integer.parseInt(parts[5]);
                    final int currentExpectedShard = Integer.parseInt(parts[6]);

                    OperationRouting operationRouting = node.injector().getInstance(OperationRouting.class);
                    for (Version version : allVersions()) {
                        final Settings settings = settings(version).build();
                        IndexMetaData indexMetaData = IndexMetaData.builder(index).settings(settings).numberOfShards(numberOfShards).numberOfReplicas(randomInt(3)).build();
                        MetaData.Builder metaData = MetaData.builder().put(indexMetaData, false);
                        RoutingTable routingTable = RoutingTable.builder().addAsNew(indexMetaData).build();
View Full Code Here

Examples of play.Application.injector()

*/
public class WS {

    public static WSClient client() {
        Application app = play.Play.application();
        return app.injector().instanceOf(WSClient.class);
    }

    /**
     * Prepare a new request. You can then construct it by chaining calls.
     *
 
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.