@Override protected ClusterBlockException checkRequestBlock(ClusterState state, InternalRequest request) { if (request.concreteIndex() != null) { return super.checkRequestBlock(state, request); } return null; }
@Override protected void doExecute(ExplainRequest request, ActionListener<ExplainResponse> listener) { request.nowInMillis = System.currentTimeMillis(); super.doExecute(request, listener); }
protected TransportSingleShardAction(Settings settings, String actionName, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, Supplier<Request> request, String executor) { super(settings, actionName, threadPool, actionFilters, indexNameExpressionResolver, transportService.getTaskManager()); this.clusterService = clusterService; this.transportService = transportService; this.transportShardAction = actionName + "[s]"; this.executor = executor; if (!isSubAction()) { transportService.registerRequestHandler(actionName, request, ThreadPool.Names.SAME, new TransportHandler()); } transportService.registerRequestHandler(transportShardAction, request, ThreadPool.Names.SAME, new ShardTransportHandler()); }
protected void asyncShardOperation(Request request, ShardId shardId, ActionListener<Response> listener) throws IOException { threadPool.executor(getExecutor(request, shardId)).execute(new AbstractRunnable() { @Override public void onFailure(Exception e) { listener.onFailure(e); } @Override protected void doRun() throws Exception { listener.onResponse(shardOperation(request, shardId)); } }); }
@Override protected void doRun() throws Exception { listener.onResponse(shardOperation(request, shardId)); } });
@Override protected String getExecutor(GetRequest request, ShardId shardId) { IndexService indexService = indicesService.indexServiceSafe(shardId.getIndex()); return indexService.getIndexSettings().isSearchThrottled() ? ThreadPool.Names.SEARCH_THROTTLED : super.getExecutor(request, shardId); } }
@Override protected void doRun() throws Exception { listener.onResponse(shardOperation(request, shardId)); } });
@Override protected ClusterBlockException checkRequestBlock(ClusterState state, InternalRequest request) { if (request.concreteIndex() != null) { return super.checkRequestBlock(state, request); } return null; }
@Override protected void doExecute(ExplainRequest request, ActionListener<ExplainResponse> listener) { request.nowInMillis = System.currentTimeMillis(); super.doExecute(request, listener); }
protected TransportSingleShardAction(Settings settings, String actionName, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, Supplier<Request> request, String executor) { super(settings, actionName, threadPool, actionFilters, indexNameExpressionResolver, transportService.getTaskManager()); this.clusterService = clusterService; this.transportService = transportService; this.transportShardAction = actionName + "[s]"; this.executor = executor; if (!isSubAction()) { transportService.registerRequestHandler(actionName, request, ThreadPool.Names.SAME, new TransportHandler()); } transportService.registerRequestHandler(transportShardAction, request, ThreadPool.Names.SAME, new ShardTransportHandler()); }
@Override protected String getExecutor(MultiTermVectorsShardRequest request, ShardId shardId) { IndexService indexService = indicesService.indexServiceSafe(shardId.getIndex()); return indexService.getIndexSettings().isSearchThrottled() ? ThreadPool.Names.SEARCH_THROTTLED : super.getExecutor(request, shardId); } }
@Override protected ClusterBlockException checkRequestBlock(ClusterState state, InternalRequest request) { if (request.concreteIndex() != null) { return super.checkRequestBlock(state, request); } return null; }
@Override protected void doExecute(ExplainRequest request, ActionListener<ExplainResponse> listener) { request.nowInMillis = System.currentTimeMillis(); super.doExecute(request, listener); }
protected TransportSingleShardAction(Settings settings, String actionName, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, Supplier<Request> request, String executor) { super(settings, actionName, threadPool, actionFilters, indexNameExpressionResolver, transportService.getTaskManager()); this.clusterService = clusterService; this.transportService = transportService; this.transportShardAction = actionName + "[s]"; this.executor = executor; if (!isSubAction()) { transportService.registerRequestHandler(actionName, request, ThreadPool.Names.SAME, new TransportHandler()); } transportService.registerRequestHandler(transportShardAction, request, executor, new ShardTransportHandler()); }
@Override protected String getExecutor(TermVectorsRequest request, ShardId shardId) { IndexService indexService = indicesService.indexServiceSafe(shardId.getIndex()); return indexService.getIndexSettings().isSearchThrottled() ? ThreadPool.Names.SEARCH_THROTTLED : super.getExecutor(request, shardId); } }
@Override protected ClusterBlockException checkRequestBlock(ClusterState state, InternalRequest request) { if (request.concreteIndex() != null) { return super.checkRequestBlock(state, request); } return null; }
@Override protected void doExecute(ExplainRequest request, ActionListener<ExplainResponse> listener) { request.nowInMillis = System.currentTimeMillis(); super.doExecute(request, listener); }
protected TransportSingleShardAction(Settings settings, String actionName, ThreadPool threadPool, ClusterService clusterService, TransportService transportService, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, Supplier<Request> request, String executor) { super(settings, actionName, threadPool, actionFilters, indexNameExpressionResolver, transportService.getTaskManager()); this.clusterService = clusterService; this.transportService = transportService; this.transportShardAction = actionName + "[s]"; this.executor = executor; if (!isSubAction()) { transportService.registerRequestHandler(actionName, request, ThreadPool.Names.SAME, new TransportHandler()); } transportService.registerRequestHandler(transportShardAction, request, executor, new ShardTransportHandler()); }
@Override protected String getExecutor(MultiGetShardRequest request, ShardId shardId) { IndexService indexService = indicesService.indexServiceSafe(shardId.getIndex()); return indexService.getIndexSettings().isSearchThrottled() ? ThreadPool.Names.SEARCH_THROTTLED : super.getExecutor(request, shardId); } }
@Override protected ClusterBlockException checkRequestBlock(ClusterState state, InternalRequest request) { if (request.concreteIndex() != null) { return super.checkRequestBlock(state, request); } return null; }