Examples of currentNodeId()


Examples of org.elasticsearch.cluster.routing.ShardRouting.currentNodeId()

            if (internalRequest.request().preferLocalShard()) {
                boolean foundLocal = false;
                ShardRouting shardX;
                while ((shardX = shardsIt.nextOrNull()) != null) {
                    final ShardRouting shard = shardX;
                    if (shard.currentNodeId().equals(nodes.localNodeId())) {
                        foundLocal = true;
                        if (internalRequest.request().operationThreaded()) {
                            internalRequest.request().beforeLocalFork();
                            threadPool.executor(executor()).execute(new Runnable() {
                                @Override
View Full Code Here

Examples of org.elasticsearch.cluster.routing.ShardRouting.currentNodeId()

                        logger.debug("failed to execute [" + internalRequest.request() + "]", failure);
                    }
                }
                listener.onFailure(failure);
            } else {
                if (shard.currentNodeId().equals(nodes.localNodeId())) {
                    // we don't prefer local shard, so try and do it here
                    if (!internalRequest.request().preferLocalShard()) {
                        try {
                            if (internalRequest.request().operationThreaded()) {
                                internalRequest.request().beforeLocalFork();
View Full Code Here

Examples of org.elasticsearch.cluster.routing.ShardRouting.currentNodeId()

                        }
                    } else {
                        perform(lastException);
                    }
                } else {
                    DiscoveryNode node = nodes.get(shard.currentNodeId());
                    transportService.sendRequest(node, transportShardAction, new ShardSingleOperationRequest(internalRequest.request(), shard.shardId()), new BaseTransportResponseHandler<Response>() {
                        @Override
                        public Response newInstance() {
                            return newResponse();
                        }
View Full Code Here

Examples of org.elasticsearch.cluster.routing.ShardRouting.currentNodeId()

            if (!operationStarted.compareAndSet(false, true)) {
                return true;
            }

            internalRequest.request().shardId = shardIt.shardId().id();
            if (shard.currentNodeId().equals(nodes.localNodeId())) {
                internalRequest.request().beforeLocalFork();
                try {
                    threadPool.executor(executor).execute(new Runnable() {
                        @Override
                        public void run() {
View Full Code Here

Examples of org.elasticsearch.cluster.routing.ShardRouting.currentNodeId()

                    } else {
                        listener.onFailure(e);
                    }
                }
            } else {
                DiscoveryNode node = nodes.get(shard.currentNodeId());
                transportService.sendRequest(node, actionName, internalRequest.request(), transportOptions(), new BaseTransportResponseHandler<Response>() {

                    @Override
                    public Response newInstance() {
                        return newResponse();
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.