org.elasticsearch.common.inject.Inject Java Examples

The following examples show how to use org.elasticsearch.common.inject.Inject. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ReindexRestAction.java    From elasticsearch-reindexing with Apache License 2.0 6 votes vote down vote up
@Inject
public ReindexRestAction(final Settings settings, final Client client,
        final RestController restController,
        final ReindexingService reindexingService) {
    super(settings, restController, client);
    this.reindexingService = reindexingService;

    restController.registerHandler(RestRequest.Method.GET,
            "/_reindex", this);
    restController.registerHandler(RestRequest.Method.GET,
            "/_reindex/{name}", this);

    restController.registerHandler(RestRequest.Method.POST,
            "/{index}/{type}/_reindex/{toindex}/{totype}", this);
    restController.registerHandler(RestRequest.Method.POST,
            "/{index}/{type}/_reindex/{toindex}", this);
    restController.registerHandler(RestRequest.Method.POST,
            "/{index}/_reindex/{toindex}/{totype}", this);
    restController.registerHandler(RestRequest.Method.POST,
            "/{index}/_reindex/{toindex}", this);

    restController.registerHandler(RestRequest.Method.DELETE,
            "/_reindex/{name}", this);
}
 
Example #2
Source File: IndicesClusterStateService.java    From crate with Apache License 2.0 6 votes vote down vote up
@Inject
public IndicesClusterStateService(Settings settings,
                                  IndicesService indicesService,
                                  ClusterService clusterService,
                                  ThreadPool threadPool,
                                  PeerRecoveryTargetService recoveryTargetService,
                                  ShardStateAction shardStateAction,
                                  NodeMappingRefreshAction nodeMappingRefreshAction,
                                  RepositoriesService repositoriesService,
                                  SyncedFlushService syncedFlushService,
                                  PeerRecoverySourceService peerRecoverySourceService,
                                  SnapshotShardsService snapshotShardsService,
                                  PrimaryReplicaSyncer primaryReplicaSyncer,
                                  GlobalCheckpointSyncAction globalCheckpointSyncAction) {
    this(settings, (AllocatedIndices<? extends Shard, ? extends AllocatedIndex<? extends Shard>>) indicesService,
            clusterService, threadPool, recoveryTargetService, shardStateAction,
            nodeMappingRefreshAction, repositoriesService, syncedFlushService, peerRecoverySourceService,
            snapshotShardsService, primaryReplicaSyncer, globalCheckpointSyncAction::updateGlobalCheckpointForShard);
}
 
Example #3
Source File: InjectionPoint.java    From crate with Apache License 2.0 6 votes vote down vote up
private static <M extends Member & AnnotatedElement> void addInjectorsForMembers(
        TypeLiteral<?> typeLiteral, Factory<M> factory, boolean statics,
        Collection<InjectionPoint> injectionPoints, Errors errors) {
    for (M member : factory.getMembers(getRawType(typeLiteral.getType()))) {
        if (isStatic(member) != statics) {
            continue;
        }

        Inject inject = member.getAnnotation(Inject.class);
        if (inject == null) {
            continue;
        }

        try {
            injectionPoints.add(factory.create(typeLiteral, member, errors));
        } catch (ConfigurationException ignorable) {
            if (!inject.optional()) {
                errors.merge(ignorable.getErrorMessages());
            }
        }
    }
}
 
Example #4
Source File: RestSearchAction.java    From Elasticsearch with Apache License 2.0 6 votes vote down vote up
@Inject
public RestSearchAction(Settings settings, RestController controller, Client client) {
    super(settings, controller, client);
    controller.registerHandler(GET, "/_search", this);
    controller.registerHandler(POST, "/_search", this);
    controller.registerHandler(GET, "/{index}/_search", this);
    controller.registerHandler(POST, "/{index}/_search", this);
    controller.registerHandler(GET, "/{index}/{type}/_search", this);
    controller.registerHandler(POST, "/{index}/{type}/_search", this);
    controller.registerHandler(GET, "/_search/template", this);
    controller.registerHandler(POST, "/_search/template", this);
    controller.registerHandler(GET, "/{index}/_search/template", this);
    controller.registerHandler(POST, "/{index}/_search/template", this);
    controller.registerHandler(GET, "/{index}/{type}/_search/template", this);
    controller.registerHandler(POST, "/{index}/{type}/_search/template", this);

    RestExistsAction restExistsAction = new RestExistsAction(settings, controller, client);
    controller.registerHandler(GET, "/_search/exists", restExistsAction);
    controller.registerHandler(POST, "/_search/exists", restExistsAction);
    controller.registerHandler(GET, "/{index}/_search/exists", restExistsAction);
    controller.registerHandler(POST, "/{index}/_search/exists", restExistsAction);
    controller.registerHandler(GET, "/{index}/{type}/_search/exists", restExistsAction);
    controller.registerHandler(POST, "/{index}/{type}/_search/exists", restExistsAction);
}
 
Example #5
Source File: ShardCollectSource.java    From Elasticsearch with Apache License 2.0 6 votes vote down vote up
@Inject
public ShardCollectSource(Settings settings,
                          IndexNameExpressionResolver indexNameExpressionResolver,
                          IndicesService indicesService,
                          Functions functions,
                          ClusterService clusterService,
                          ThreadPool threadPool,
                          TransportActionProvider transportActionProvider,
                          BulkRetryCoordinatorPool bulkRetryCoordinatorPool,
                          RemoteCollectorFactory remoteCollectorFactory,
                          SystemCollectSource systemCollectSource,
                          NodeSysExpression nodeSysExpression) {
    this.settings = settings;
    this.indexNameExpressionResolver = indexNameExpressionResolver;
    this.indicesService = indicesService;
    this.functions = functions;
    this.clusterService = clusterService;
    this.threadPool = threadPool;
    this.remoteCollectorFactory = remoteCollectorFactory;
    this.systemCollectSource = systemCollectSource;
    this.executor = MoreExecutors.listeningDecorator((ExecutorService) threadPool.executor(ThreadPool.Names.SEARCH));
    this.transportActionProvider = transportActionProvider;
    this.bulkRetryCoordinatorPool = bulkRetryCoordinatorPool;
    this.nodeSysExpression = nodeSysExpression;
}
 
Example #6
Source File: DLDiscovery.java    From Elasticsearch with Apache License 2.0 6 votes vote down vote up
@Inject
public DLDiscovery(Settings settings, ClusterName clusterName, ThreadPool threadPool,
        TransportService transportService, final ClusterService clusterService, 
        DiscoverySettings discoverySettings, Environment nodeEnvironment) {
    super(settings);
    this.clusterService = clusterService;
    this.clusterName = clusterName;
    this.discoverySettings = discoverySettings;
    this.threadPool = threadPool;
    this.nodeEnvironment = nodeEnvironment;
    this.transportService = transportService;
    this.clusterStateOpLog = null;
    this.publishClusterStateVersionAction = null;
    this.joinClusterAction = null;
    this.nodesFailureDetectionService = null;
}
 
Example #7
Source File: TransportCancelTasksAction.java    From Elasticsearch with Apache License 2.0 6 votes vote down vote up
@Inject
public TransportCancelTasksAction(Settings settings, ClusterName clusterName, ThreadPool threadPool, ClusterService clusterService,
                                  TransportService transportService, ActionFilters actionFilters, IndexNameExpressionResolver
                                      indexNameExpressionResolver) {
    super(settings, CancelTasksAction.NAME, clusterName, threadPool, clusterService, transportService, actionFilters,
        indexNameExpressionResolver, new Callable<CancelTasksRequest>() {
            @Override
            public CancelTasksRequest call() throws Exception {
                return new CancelTasksRequest();
            }
        }, ThreadPool.Names.MANAGEMENT);
    transportService.registerRequestHandler(BAN_PARENT_ACTION_NAME, new Callable<BanParentTaskRequest>() {
        @Override
        public BanParentTaskRequest call() throws Exception {
            return new BanParentTaskRequest();
        }
    }, ThreadPool.Names.SAME, new
        BanParentRequestHandler());
}
 
Example #8
Source File: ProfileTransportAction.java    From anomaly-detection with Apache License 2.0 6 votes vote down vote up
/**
 * Constructor
 *
 * @param threadPool ThreadPool to use
 * @param clusterService ClusterService
 * @param transportService TransportService
 * @param actionFilters Action Filters
 * @param modelManager model manager object
 * @param featureManager feature manager object
 */
@Inject
public ProfileTransportAction(
    ThreadPool threadPool,
    ClusterService clusterService,
    TransportService transportService,
    ActionFilters actionFilters,
    ModelManager modelManager,
    FeatureManager featureManager
) {
    super(
        ProfileAction.NAME,
        threadPool,
        clusterService,
        transportService,
        actionFilters,
        ProfileRequest::new,
        ProfileNodeRequest::new,
        ThreadPool.Names.MANAGEMENT,
        ProfileNodeResponse.class
    );
    this.modelManager = modelManager;
    this.featureManager = featureManager;
}
 
Example #9
Source File: SnapshotShardsService.java    From crate with Apache License 2.0 6 votes vote down vote up
@Inject
public SnapshotShardsService(Settings settings, ClusterService clusterService, RepositoriesService repositoriesService,
                             ThreadPool threadPool, TransportService transportService, IndicesService indicesService,
                             IndexNameExpressionResolver indexNameExpressionResolver) {
    this.indicesService = indicesService;
    this.repositoriesService = repositoriesService;
    this.transportService = transportService;
    this.clusterService = clusterService;
    this.threadPool = threadPool;
    if (DiscoveryNode.isDataNode(settings)) {
        // this is only useful on the nodes that can hold data
        clusterService.addListener(this);
    }

    // The constructor of UpdateSnapshotStatusAction will register itself to the TransportService.
    this.updateSnapshotStatusHandler =
        new UpdateSnapshotStatusAction(transportService, clusterService, threadPool, indexNameExpressionResolver);
}
 
Example #10
Source File: TransportClientNodesService.java    From Elasticsearch with Apache License 2.0 6 votes vote down vote up
@Inject
public TransportClientNodesService(Settings settings, ClusterName clusterName, TransportService transportService,
                                   ThreadPool threadPool, Headers headers, Version version) {
    super(settings);
    this.clusterName = clusterName;
    this.transportService = transportService;
    this.threadPool = threadPool;
    this.minCompatibilityVersion = version.minimumCompatibilityVersion();
    this.headers = headers;

    this.nodesSamplerInterval = this.settings.getAsTime("client.transport.nodes_sampler_interval", timeValueSeconds(5));
    this.pingTimeout = this.settings.getAsTime("client.transport.ping_timeout", timeValueSeconds(5)).millis();
    this.ignoreClusterName = this.settings.getAsBoolean("client.transport.ignore_cluster_name", false);

    if (logger.isDebugEnabled()) {
        logger.debug("node_sampler_interval[" + nodesSamplerInterval + "]");
    }

    if (this.settings.getAsBoolean("client.transport.sniff", false)) {
        this.nodesSampler = new SniffNodesSampler();
    } else {
        this.nodesSampler = new SimpleNodeSampler();
    }
    this.nodesSamplerFuture = threadPool.schedule(nodesSamplerInterval, ThreadPool.Names.GENERIC, new ScheduledNodeSampler());
}
 
Example #11
Source File: TransportGetSnapshotsAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportGetSnapshotsAction(Settings settings, TransportService transportService, ClusterService clusterService,
                                   ThreadPool threadPool, SnapshotsService snapshotsService, ActionFilters actionFilters,
                                   IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, GetSnapshotsAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver, GetSnapshotsRequest.class);
    this.snapshotsService = snapshotsService;
}
 
Example #12
Source File: DDLStatementDispatcher.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public DDLStatementDispatcher(BlobIndices blobIndices,
                              TableCreator tableCreator,
                              AlterTableOperation alterTableOperation,
                              RepositoryService repositoryService,
                              SnapshotRestoreDDLDispatcher snapshotRestoreDDLDispatcher,
                              TransportActionProvider transportActionProvider) {
    this.blobIndices = blobIndices;
    this.tableCreator = tableCreator;
    this.alterTableOperation = alterTableOperation;
    this.transportActionProvider = transportActionProvider;
    this.repositoryService = repositoryService;
    this.snapshotRestoreDDLDispatcher = snapshotRestoreDDLDispatcher;
}
 
Example #13
Source File: SystemCollectSource.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public SystemCollectSource(DiscoveryService discoveryService,
                           Functions functions,
                           StatsTables statsTables,
                           InformationSchemaIterables informationSchemaIterables,
                           SysChecker sysChecker,
                           SysRepositories sysRepositories,
                           SysSnapshots sysSnapshots) {
    docInputSymbolVisitor = new CollectInputSymbolVisitor<>(functions, RowContextReferenceResolver.INSTANCE);

    iterableGetters = ImmutableMap.<String, Supplier<Iterable<?>>>builder()
            .put(InformationSchemataTableInfo.IDENT.fqn(), informationSchemaIterables.schemas())
            .put(InformationTablesTableInfo.IDENT.fqn(), informationSchemaIterables.tables())
            .put(InformationPartitionsTableInfo.IDENT.fqn(), informationSchemaIterables.partitions())
            .put(InformationColumnsTableInfo.IDENT.fqn(), informationSchemaIterables.columns())
            .put(InformationTableConstraintsTableInfo.IDENT.fqn(), informationSchemaIterables.constraints())
            .put(InformationRoutinesTableInfo.IDENT.fqn(), informationSchemaIterables.routines())
            .put(SysJobsTableInfo.IDENT.fqn(), statsTables.jobsGetter())
            .put(SysJobsLogTableInfo.IDENT.fqn(), statsTables.jobsLogGetter())
            .put(SysOperationsTableInfo.IDENT.fqn(), statsTables.operationsGetter())
            .put(SysOperationsLogTableInfo.IDENT.fqn(), statsTables.operationsLogGetter())
            .put(SysChecksTableInfo.IDENT.fqn(), sysChecker)
            .put(SysRepositoriesTableInfo.IDENT.fqn(), sysRepositories)
            .put(SysSnapshotsTableInfo.IDENT.fqn(), sysSnapshots)
            .build();
    this.discoveryService = discoveryService;
}
 
Example #14
Source File: NodeDisconnectJobMonitorService.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public NodeDisconnectJobMonitorService(Settings settings,
                                       ThreadPool threadPool,
                                       JobContextService jobContextService,
                                       TransportService transportService) {
    super(settings);
    this.threadPool = threadPool;
    this.jobContextService = jobContextService;
    this.transportService = transportService;
}
 
Example #15
Source File: TransportShardBulkAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportShardBulkAction(Settings settings, TransportService transportService, ClusterService clusterService,
                                IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction,
                                MappingUpdatedAction mappingUpdatedAction, UpdateHelper updateHelper, ActionFilters actionFilters,
                                IndexNameExpressionResolver indexNameExpressionResolver, FsService fsService) {
    super(settings, ACTION_NAME, transportService, clusterService, indicesService, threadPool, shardStateAction, mappingUpdatedAction,
            actionFilters, indexNameExpressionResolver,
            BulkShardRequest.class, BulkShardRequest.class, ThreadPool.Names.BULK);
    this.updateHelper = updateHelper;
    this.allowIdGeneration = settings.getAsBoolean("action.allow_id_generation", true);
    this.fsService = fsService;
}
 
Example #16
Source File: TransportRecoveryAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportRecoveryAction(Settings settings, ThreadPool threadPool, ClusterService clusterService,
                               TransportService transportService, IndicesService indicesService,
                               ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, RecoveryAction.NAME, threadPool, clusterService, transportService, actionFilters, indexNameExpressionResolver,
            RecoveryRequest.class, ThreadPool.Names.MANAGEMENT);
    this.indicesService = indicesService;
}
 
Example #17
Source File: RestNodesInfoAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public RestNodesInfoAction(Settings settings, RestController controller, Client client, SettingsFilter settingsFilter) {
    super(settings, controller, client);
    controller.registerHandler(GET, "/_nodes", this);
    // this endpoint is used for metrics, not for nodeIds, like /_nodes/fs
    controller.registerHandler(GET, "/_nodes/{nodeId}", this);
    controller.registerHandler(GET, "/_nodes/{nodeId}/{metrics}", this);
    // added this endpoint to be aligned with stats
    controller.registerHandler(GET, "/_nodes/{nodeId}/info/{metrics}", this);

    this.settingsFilter = settingsFilter;
}
 
Example #18
Source File: RestMultiGetAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public RestMultiGetAction(Settings settings, RestController controller, Client client) {
    super(settings, controller, client);
    controller.registerHandler(GET, "/_mget", this);
    controller.registerHandler(POST, "/_mget", this);
    controller.registerHandler(GET, "/{index}/_mget", this);
    controller.registerHandler(POST, "/{index}/_mget", this);
    controller.registerHandler(GET, "/{index}/{type}/_mget", this);
    controller.registerHandler(POST, "/{index}/{type}/_mget", this);

    this.allowExplicitIndex = settings.getAsBoolean("rest.action.multi.allow_explicit_index", true);
}
 
Example #19
Source File: TransportFeatureStoreAction.java    From elasticsearch-learning-to-rank with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportFeatureStoreAction(TransportService transportService,
                                   ActionFilters actionFilters,
                                   ClusterService clusterService, Client client,
                                   LtrRankerParserFactory factory,
                                   TransportClearCachesAction clearCachesAction) {
    super(FeatureStoreAction.NAME, false, transportService, actionFilters, FeatureStoreRequest::new);
    this.factory = factory;
    this.clusterService = clusterService;
    this.clearCachesAction = clearCachesAction;
    this.client = client;
}
 
Example #20
Source File: BlobStoreIndexShardRepository.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public BlobStoreIndexShardRepository(Settings settings, RepositoryName repositoryName, IndicesService indicesService, ClusterService clusterService) {
    super(settings);
    this.parseFieldMatcher = new ParseFieldMatcher(settings);
    this.repositoryName = repositoryName.name();
    this.indicesService = indicesService;
    this.clusterService = clusterService;
}
 
Example #21
Source File: ExportParser.java    From elasticsearch-inout-plugin with Apache License 2.0 5 votes vote down vote up
@Inject
public ExportParser(QueryPhase queryPhase, FetchPhase fetchPhase) {
    Map<String, SearchParseElement> elementParsers = new HashMap<String, SearchParseElement>();
    elementParsers.putAll(queryPhase.parseElements());
    elementParsers.put("fields", new FieldsParseElement());
    elementParsers.put("output_cmd", new ExportOutputCmdParseElement());
    elementParsers.put("output_file", new ExportOutputFileParseElement());
    elementParsers.put("force_overwrite", new ExportForceOverwriteParseElement());
    elementParsers.put("compression", new ExportCompressionParseElement());
    elementParsers.put("explain", new ExplainParseElement());
    elementParsers.put("mappings", new ExportMappingsParseElement());
    elementParsers.put("settings", new ExportSettingsParseElement());
    this.elementParsers = ImmutableMap.copyOf(elementParsers);
}
 
Example #22
Source File: DefaultNodeFactory.java    From elasticshell with Apache License 2.0 5 votes vote down vote up
@Inject
DefaultNodeFactory(ClientWrapper<ShellNativeClient, JsonInput, JsonOutput> clientWrapper,
                          ResourceRegistry resourceRegistry,
                          ClientScopeSynchronizerRunner<ShellNativeClient> clientScopeSynchronizerRunner,
                          ShellSettings shellSettings) {

    this.clientWrapper = clientWrapper;
    this.resourceRegistry = resourceRegistry;
    this.clientScopeSynchronizerRunner = clientScopeSynchronizerRunner;
    this.shellSettings = shellSettings;
}
 
Example #23
Source File: BlobIndex.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public BlobIndex(Index index, IndexSettingsService indexSettingsService,
          OperationRouting operationRouting, ClusterService clusterService) {
    super(index, indexSettingsService.getSettings());
    this.operationRouting = operationRouting;
    this.clusterService = clusterService;
}
 
Example #24
Source File: TransportExplainAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportExplainAction(Settings settings, ThreadPool threadPool, ClusterService clusterService,
                              TransportService transportService, IndicesService indicesService,
                              ScriptService scriptService, PageCacheRecycler pageCacheRecycler,
                              BigArrays bigArrays, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, ExplainAction.NAME, threadPool, clusterService, transportService, actionFilters, indexNameExpressionResolver,
            ExplainRequest.class, ThreadPool.Names.GET);
    this.indicesService = indicesService;
    this.scriptService = scriptService;
    this.pageCacheRecycler = pageCacheRecycler;
    this.bigArrays = bigArrays;
}
 
Example #25
Source File: FileCollectSource.java    From crate with Apache License 2.0 5 votes vote down vote up
@Inject
public FileCollectSource(Functions functions, ClusterService clusterService, Map<String, FileInputFactory> fileInputFactoryMap) {
    this.fileInputFactoryMap = fileInputFactoryMap;
    this.functions = functions;
    this.inputFactory = new InputFactory(functions);
    this.clusterService = clusterService;
}
 
Example #26
Source File: TransportDumpAction.java    From elasticsearch-inout-plugin with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportDumpAction(Settings settings, ThreadPool threadPool, ClusterService clusterService,
                           TransportService transportService, IndicesService indicesService,
                           ScriptService scriptService, CacheRecycler cacheRecycler,
                           DumpParser dumpParser, Exporter exporter, NodeEnvironment nodeEnv) {
    super(settings, threadPool, clusterService, transportService, indicesService, scriptService,
        cacheRecycler, dumpParser, exporter, nodeEnv);
}
 
Example #27
Source File: TransportCreateIndexAction.java    From crate with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportCreateIndexAction(TransportService transportService,
                                  ClusterService clusterService,
                                  ThreadPool threadPool,
                                  MetaDataCreateIndexService createIndexService,
                                  IndexNameExpressionResolver indexNameExpressionResolver) {
    super(CreateIndexAction.NAME, transportService, clusterService, threadPool, CreateIndexRequest::new, indexNameExpressionResolver);
    this.createIndexService = createIndexService;
}
 
Example #28
Source File: TransportIndexShardStatsAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportIndexShardStatsAction(Settings settings, ThreadPool threadPool, ClusterService clusterService,
                                   TransportService transportService, IndicesService indicesService,
                                   ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, IndexShardStatsAction.NAME, threadPool, clusterService, transportService, actionFilters, indexNameExpressionResolver,
            IndexShardStatsRequest.class, ThreadPool.Names.MANAGEMENT);
    this.indicesService = indicesService;
}
 
Example #29
Source File: TransportPutIndexTemplateAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportPutIndexTemplateAction(Settings settings, TransportService transportService, ClusterService clusterService,
                                       ThreadPool threadPool, MetaDataIndexTemplateService indexTemplateService,
                                       ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, PutIndexTemplateAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver, PutIndexTemplateRequest.class);
    this.indexTemplateService = indexTemplateService;
}
 
Example #30
Source File: DiscoverySettings.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public DiscoverySettings(Settings settings, NodeSettingsService nodeSettingsService) {
    super(settings);
    nodeSettingsService.addListener(new ApplySettings());
    this.noMasterBlock = parseNoMasterBlock(settings.get(NO_MASTER_BLOCK, DEFAULT_NO_MASTER_BLOCK));
    this.publishTimeout = settings.getAsTime(PUBLISH_TIMEOUT, publishTimeout);
    this.publishDiff = settings.getAsBoolean(PUBLISH_DIFF_ENABLE, DEFAULT_PUBLISH_DIFF_ENABLE);
}