org.elasticsearch.cluster.metadata.IndexNameExpressionResolver Java Examples

The following examples show how to use org.elasticsearch.cluster.metadata.IndexNameExpressionResolver. 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: RemoteCollectorFactory.java    From Elasticsearch with Apache License 2.0 6 votes vote down vote up
@Inject
public RemoteCollectorFactory(ClusterService clusterService,
                              Functions functions,
                              ThreadPool threadPool,
                              JobContextService jobContextService,
                              Settings settings,
                              TransportActionProvider transportActionProvider,
                              BulkRetryCoordinatorPool bulkRetryCoordinatorPool,
                              IndexNameExpressionResolver indexNameExpressionResolver,
                              NestedReferenceResolver referenceResolver) {
    this.clusterService = clusterService;
    this.functions = functions;
    this.threadPool = threadPool;
    this.jobContextService = jobContextService;
    this.settings = settings;
    this.transportActionProvider = transportActionProvider;
    this.bulkRetryCoordinatorPool = bulkRetryCoordinatorPool;
    this.indexNameExpressionResolver = indexNameExpressionResolver;

    normalizer = new EvaluatingNormalizer(functions, RowGranularity.NODE, referenceResolver);
    implementationVisitor = new ImplementationSymbolVisitor(functions);
}
 
Example #2
Source File: TransportTasksAction.java    From Elasticsearch with Apache License 2.0 6 votes vote down vote up
protected TransportTasksAction(Settings settings, String actionName, ClusterName clusterName, ThreadPool threadPool,
                               ClusterService clusterService, TransportService transportService, ActionFilters actionFilters,
                               IndexNameExpressionResolver indexNameExpressionResolver, Callable<TasksRequest> requestFactory,
                               String nodeExecutor) {
    super(settings, actionName, threadPool, transportService, actionFilters, indexNameExpressionResolver, requestFactory);
    this.clusterName = clusterName;
    this.clusterService = clusterService;
    this.transportService = transportService;
    this.transportNodeAction = actionName + "[n]";
    this.requestFactory = requestFactory;

    transportService.registerRequestHandler(transportNodeAction, new Callable<NodeTaskRequest>() {
        @Override
        public NodeTaskRequest call() throws Exception {
            return new NodeTaskRequest();
        }
    }, nodeExecutor, new NodeTransportHandler());
}
 
Example #3
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 #4
Source File: TransportDeleteBlobAction.java    From Elasticsearch with Apache License 2.0 6 votes vote down vote up
@Inject
public TransportDeleteBlobAction(Settings settings,
                                 TransportService transportService,
                                 ClusterService clusterService,
                                 IndicesService indicesService,
                                 ThreadPool threadPool,
                                 ShardStateAction shardStateAction,
                                 BlobIndices blobIndices,
                                 MappingUpdatedAction mappingUpdatedAction,
                                 ActionFilters actionFilters,
                                 IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, DeleteBlobAction.NAME, transportService, clusterService, indicesService, threadPool, shardStateAction,
            mappingUpdatedAction, actionFilters, indexNameExpressionResolver, DeleteBlobRequest.class, DeleteBlobRequest.class, ThreadPool.Names.INDEX);
    this.blobIndices = blobIndices;
    logger.trace("Constructor");
}
 
Example #5
Source File: ReferenceInfos.java    From Elasticsearch with Apache License 2.0 6 votes vote down vote up
@Inject
public ReferenceInfos(Map<String, SchemaInfo> builtInSchemas,
                      ClusterService clusterService,
                      IndexNameExpressionResolver indexNameExpressionResolver,
                      ThreadPool threadPool,
                      Provider<TransportPutIndexTemplateAction> transportPutIndexTemplateAction,
                      Functions functions) {
    this.clusterService = clusterService;
    this.indexNameExpressionResolver = indexNameExpressionResolver;
    this.transportPutIndexTemplateAction = transportPutIndexTemplateAction;
    this.functions = functions;
    this.executorService = (ExecutorService) threadPool.executor(ThreadPool.Names.SUGGEST);
    schemas.putAll(builtInSchemas);
    schemas.remove(BlobSchemaInfo.NAME); // remove blob schema name
    this.builtInSchemas = builtInSchemas;
    clusterService.add(this);
}
 
Example #6
Source File: TransportBroadcastByNodeAction.java    From Elasticsearch with Apache License 2.0 6 votes vote down vote up
public TransportBroadcastByNodeAction(
        Settings settings,
        String actionName,
        ThreadPool threadPool,
        ClusterService clusterService,
        TransportService transportService,
        ActionFilters actionFilters,
        IndexNameExpressionResolver indexNameExpressionResolver,
        Class<Request> request,
        String executor) {
    super(settings, actionName, threadPool, transportService, actionFilters, indexNameExpressionResolver, request);

    this.clusterService = clusterService;
    this.transportService = transportService;

    transportNodeBroadcastAction = actionName + "[n]";

    transportService.registerRequestHandler(transportNodeBroadcastAction, new Callable<NodeRequest>() {
        @Override
        public NodeRequest call() throws Exception {
            return new NodeRequest();
        }
    }, executor, new BroadcastByNodeTransportRequestHandler());
}
 
Example #7
Source File: DocTableInfoBuilder.java    From Elasticsearch with Apache License 2.0 6 votes vote down vote up
public DocTableInfoBuilder(Functions functions,
                           TableIdent ident,
                           ClusterService clusterService,
                           IndexNameExpressionResolver indexNameExpressionResolver,
                           TransportPutIndexTemplateAction transportPutIndexTemplateAction,
                           ExecutorService executorService,
                           boolean checkAliasSchema) {
    this.functions = functions;
    this.clusterService = clusterService;
    this.indexNameExpressionResolver = indexNameExpressionResolver;
    this.transportPutIndexTemplateAction = transportPutIndexTemplateAction;
    this.ident = ident;
    this.executorService = executorService;
    this.state = clusterService.state();
    this.metaData = state.metaData();
    this.checkAliasSchema = checkAliasSchema;
}
 
Example #8
Source File: TransportClearScrollAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportClearScrollAction(Settings settings, TransportService transportService, ThreadPool threadPool,
                                  ClusterService clusterService, SearchServiceTransportAction searchServiceTransportAction,
                                  ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, ClearScrollAction.NAME, threadPool, transportService, actionFilters, indexNameExpressionResolver, ClearScrollRequest.class);
    this.clusterService = clusterService;
    this.searchServiceTransportAction = searchServiceTransportAction;
}
 
Example #9
Source File: TransportValidateQueryAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportValidateQueryAction(Settings settings, ThreadPool threadPool, ClusterService clusterService,
                                    TransportService transportService, IndicesService indicesService,
                                    ScriptService scriptService, PageCacheRecycler pageCacheRecycler,
                                    BigArrays bigArrays, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, ValidateQueryAction.NAME, threadPool, clusterService, transportService, actionFilters,
            indexNameExpressionResolver, ValidateQueryRequest.class, ShardValidateQueryRequest.class, ThreadPool.Names.SEARCH);
    this.indicesService = indicesService;
    this.scriptService = scriptService;
    this.pageCacheRecycler = pageCacheRecycler;
    this.bigArrays = bigArrays;
}
 
Example #10
Source File: TransportGetFieldMappingsAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportGetFieldMappingsAction(Settings settings, TransportService transportService, ClusterService clusterService,
                                       ThreadPool threadPool, TransportGetFieldMappingsIndexAction shardAction,
                                       ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, GetFieldMappingsAction.NAME, threadPool, transportService, actionFilters, indexNameExpressionResolver, GetFieldMappingsRequest.class);
    this.clusterService = clusterService;
    this.shardAction = shardAction;
}
 
Example #11
Source File: SearchQueryThenFetchAsyncAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
SearchQueryThenFetchAsyncAction(ESLogger logger, SearchServiceTransportAction searchService,
                                        ClusterService clusterService, IndexNameExpressionResolver indexNameExpressionResolver,
                                        SearchPhaseController searchPhaseController, ThreadPool threadPool,
                                        SearchRequest request, ActionListener<SearchResponse> listener) {
    super(logger, searchService, clusterService, indexNameExpressionResolver, searchPhaseController, threadPool, request, listener);
    fetchResults = new AtomicArray<>(firstResults.length());
    docIdsToLoad = new AtomicArray<>(firstResults.length());
}
 
Example #12
Source File: TransportForceMergeAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportForceMergeAction(Settings settings, ThreadPool threadPool, ClusterService clusterService,
                               TransportService transportService, IndicesService indicesService,
                               ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, ForceMergeAction.NAME, threadPool, clusterService, transportService, actionFilters, indexNameExpressionResolver,
            ForceMergeRequest.class, ThreadPool.Names.FORCE_MERGE);
    this.indicesService = indicesService;
}
 
Example #13
Source File: TransportIndicesAliasesAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportIndicesAliasesAction(Settings settings, TransportService transportService, ClusterService clusterService,
                                     ThreadPool threadPool, MetaDataIndexAliasesService indexAliasesService,
                                     ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, IndicesAliasesAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver, IndicesAliasesRequest.class);
    this.indexAliasesService = indexAliasesService;
}
 
Example #14
Source File: TransportNodesInfoAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportNodesInfoAction(Settings settings, ClusterName clusterName, ThreadPool threadPool,
                                ClusterService clusterService, TransportService transportService,
                                NodeService nodeService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, NodesInfoAction.NAME, clusterName, threadPool, clusterService, transportService, actionFilters,
            indexNameExpressionResolver, NodesInfoRequest.class, NodeInfoRequest.class, ThreadPool.Names.MANAGEMENT);
    this.nodeService = nodeService;
}
 
Example #15
Source File: SnapshotsService.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public SnapshotsService(Settings settings, ClusterService clusterService, IndexNameExpressionResolver indexNameExpressionResolver, RepositoriesService repositoriesService, ThreadPool threadPool) {
    super(settings);
    this.clusterService = clusterService;
    this.indexNameExpressionResolver = indexNameExpressionResolver;
    this.repositoriesService = repositoriesService;
    this.threadPool = threadPool;

    if (DiscoveryNode.masterNode(settings)) {
        // addLast to make sure that Repository will be created before snapshot
        clusterService.addLast(this);
    }
}
 
Example #16
Source File: TransportFlushAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportFlushAction(Settings settings, ThreadPool threadPool, ClusterService clusterService,
                            TransportService transportService, ActionFilters actionFilters,
                            IndexNameExpressionResolver indexNameExpressionResolver,
                            TransportShardFlushAction replicatedFlushAction) {
    super(FlushAction.NAME, FlushRequest.class, settings, threadPool, clusterService, transportService, actionFilters, indexNameExpressionResolver, replicatedFlushAction);
}
 
Example #17
Source File: TransportAnalyzeAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportAnalyzeAction(Settings settings, ThreadPool threadPool, ClusterService clusterService, TransportService transportService,
                              IndicesService indicesService, IndicesAnalysisService indicesAnalysisService, ActionFilters actionFilters,
                              IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, AnalyzeAction.NAME, threadPool, clusterService, transportService, actionFilters, indexNameExpressionResolver, AnalyzeRequest.class, ThreadPool.Names.INDEX);
    this.indicesService = indicesService;
    this.indicesAnalysisService = indicesAnalysisService;
}
 
Example #18
Source File: TransportGetAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportGetAction(Settings settings, ClusterService clusterService, TransportService transportService,
                          IndicesService indicesService, ThreadPool threadPool, ActionFilters actionFilters,
                          IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, GetAction.NAME, threadPool, clusterService, transportService, actionFilters, indexNameExpressionResolver,
            GetRequest.class, ThreadPool.Names.GET);
    this.indicesService = indicesService;

    this.realtime = settings.getAsBoolean("action.get.realtime", true);
}
 
Example #19
Source File: UpsertByIdTask.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
public UpsertByIdTask(UUID jobId,
                      ClusterService clusterService,
                      IndexNameExpressionResolver indexNameExpressionResolver,
                      Settings settings,
                      BulkRequestExecutor<ShardUpsertRequest> transportShardUpsertActionDelegate,
                      TransportCreateIndexAction transportCreateIndexAction,
                      TransportBulkCreateIndicesAction transportBulkCreateIndicesAction,
                      BulkRetryCoordinatorPool bulkRetryCoordinatorPool,
                      UpsertByIdNode node,
                      JobContextService jobContextService) {
    super(jobId);
    this.indexNameExpressionResolver = indexNameExpressionResolver;
    this.transportShardUpsertActionDelegate = transportShardUpsertActionDelegate;
    this.transportCreateIndexAction = transportCreateIndexAction;
    this.transportBulkCreateIndicesAction = transportBulkCreateIndicesAction;
    this.clusterService = clusterService;
    this.node = node;
    this.bulkRetryCoordinatorPool = bulkRetryCoordinatorPool;
    this.jobContextService = jobContextService;
    autoCreateIndex = new AutoCreateIndex(settings, indexNameExpressionResolver);

    if (node.items().size() == 1) {
        // skip useless usage of bulk processor if only 1 item in statement
        // and instead create upsert request directly on start()
        resultList = new ArrayList<>(1);
        resultList.add(SettableFuture.<TaskResult>create());
    } else {
        resultList = initializeBulkShardProcessor(settings);
    }

}
 
Example #20
Source File: TransportRefreshAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportRefreshAction(Settings settings, ThreadPool threadPool, ClusterService clusterService,
                              TransportService transportService, ActionFilters actionFilters,
                              IndexNameExpressionResolver indexNameExpressionResolver,
                              TransportShardRefreshAction shardRefreshAction) {
    super(RefreshAction.NAME, RefreshRequest.class, settings, threadPool, clusterService, transportService, actionFilters, indexNameExpressionResolver, shardRefreshAction);
}
 
Example #21
Source File: TransportNodesHotThreadsAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportNodesHotThreadsAction(Settings settings, ClusterName clusterName, ThreadPool threadPool,
                                      ClusterService clusterService, TransportService transportService,
                                      ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, NodesHotThreadsAction.NAME, clusterName, threadPool, clusterService, transportService, actionFilters,
            indexNameExpressionResolver, NodesHotThreadsRequest.class, NodeRequest.class, ThreadPool.Names.GENERIC);
}
 
Example #22
Source File: TransportPercolateAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportPercolateAction(Settings settings, ThreadPool threadPool, ClusterService clusterService,
                                TransportService transportService, PercolatorService percolatorService,
                                TransportGetAction getAction, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, PercolateAction.NAME, threadPool, clusterService, transportService, actionFilters,
            indexNameExpressionResolver, PercolateRequest.class, PercolateShardRequest.class, ThreadPool.Names.PERCOLATE);
    this.percolatorService = percolatorService;
    this.getAction = getAction;
}
 
Example #23
Source File: TransportBroadcastReplicationAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
public TransportBroadcastReplicationAction(String name, Class<Request> request, Settings settings, ThreadPool threadPool, ClusterService clusterService,
                                           TransportService transportService,
                                           ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, TransportReplicationAction replicatedBroadcastShardAction) {
    super(settings, name, threadPool, transportService, actionFilters, indexNameExpressionResolver, request);
    this.replicatedBroadcastShardAction = replicatedBroadcastShardAction;
    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: TransportDeleteRepositoryAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportDeleteRepositoryAction(Settings settings, TransportService transportService, ClusterService clusterService,
                                       RepositoriesService repositoriesService, ThreadPool threadPool, ActionFilters actionFilters,
                                       IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, DeleteRepositoryAction.NAME, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver, DeleteRepositoryRequest.class);
    this.repositoriesService = repositoriesService;
}
 
Example #26
Source File: BlobTableInfoBuilder.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
public BlobTableInfoBuilder(TableIdent ident,
                            ClusterService clusterService,
                            IndexNameExpressionResolver indexNameExpressionResolver,
                            BlobEnvironment blobEnvironment,
                            Environment environment,
                            Functions functions) {
    this.clusterService = clusterService;
    this.indexNameExpressionResolver = indexNameExpressionResolver;
    this.blobEnvironment = blobEnvironment;
    this.environment = environment;
    this.functions = functions;
    this.state = clusterService.state();
    this.metaData = state.metaData();
    this.ident = ident;
}
 
Example #27
Source File: TransportShardRefreshAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportShardRefreshAction(Settings settings, TransportService transportService, ClusterService clusterService,
                                   IndicesService indicesService, ThreadPool threadPool, ShardStateAction shardStateAction,
                                   MappingUpdatedAction mappingUpdatedAction, ActionFilters actionFilters,
                                   IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, NAME, transportService, clusterService, indicesService, threadPool, shardStateAction, mappingUpdatedAction,
            actionFilters, indexNameExpressionResolver, ReplicationRequest.class, ReplicationRequest.class, ThreadPool.Names.REFRESH);
}
 
Example #28
Source File: AuditLogImpl.java    From deprecated-security-advanced-modules with Apache License 2.0 5 votes vote down vote up
public AuditLogImpl(final Settings settings, final Path configPath, Client clientProvider, ThreadPool threadPool,
					final IndexNameExpressionResolver resolver, final ClusterService clusterService) {
	super(settings, threadPool, resolver, clusterService);

	this.messageRouter = new AuditMessageRouter(settings, clientProvider, threadPool, configPath);
	this.enabled = messageRouter.isEnabled();

	log.info("Message routing enabled: {}", this.enabled);

	final SecurityManager sm = System.getSecurityManager();

	if (sm != null) {
		log.debug("Security Manager present");
		sm.checkPermission(new SpecialPermission());
	}

	AccessController.doPrivileged(new PrivilegedAction<Object>() {
		@Override
		public Object run() {
			Runtime.getRuntime().addShutdownHook(new Thread() {

				@Override
				public void run() {
					try {
						close();
					} catch (final IOException e) {
						log.warn("Exception while shutting down message router", e);
					}
				}
			});
			log.debug("Shutdown Hook registered");
			return null;
		}
	});

}
 
Example #29
Source File: TransportMultiGetAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportMultiGetAction(Settings settings, ThreadPool threadPool, TransportService transportService,
                               ClusterService clusterService, TransportShardMultiGetAction shardAction,
                               ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, MultiGetAction.NAME, threadPool, transportService, actionFilters, indexNameExpressionResolver, MultiGetRequest.class);
    this.clusterService = clusterService;
    this.shardAction = shardAction;
}
 
Example #30
Source File: TransportShardMultiTermsVectorAction.java    From Elasticsearch with Apache License 2.0 5 votes vote down vote up
@Inject
public TransportShardMultiTermsVectorAction(Settings settings, ClusterService clusterService, TransportService transportService,
                                            IndicesService indicesService, ThreadPool threadPool, ActionFilters actionFilters,
                                            IndexNameExpressionResolver indexNameExpressionResolver) {
    super(settings, ACTION_NAME, threadPool, clusterService, transportService, actionFilters, indexNameExpressionResolver,
            MultiTermVectorsShardRequest.class, ThreadPool.Names.GET);
    this.indicesService = indicesService;
}