Examples of riverName()


Examples of org.elasticsearch.river.routing.RiverRouting.riverName()

                // only apply changes to the local node
                if (!routing.node().equals(localNode)) {
                    continue;
                }
                // if its already created, ignore it
                if (rivers.containsKey(routing.riverName())) {
                    continue;
                }
                client.prepareGet(riverIndexName, routing.riverName().name(), "_meta").execute(new ActionListener<GetResponse>() {
                    @Override public void onResponse(GetResponse getResponse) {
                        if (!rivers.containsKey(routing.riverName())) {
View Full Code Here

Examples of org.elasticsearch.river.routing.RiverRouting.riverName()

                }
                // if its already created, ignore it
                if (rivers.containsKey(routing.riverName())) {
                    continue;
                }
                client.prepareGet(riverIndexName, routing.riverName().name(), "_meta").execute(new ActionListener<GetResponse>() {
                    @Override public void onResponse(GetResponse getResponse) {
                        if (!rivers.containsKey(routing.riverName())) {
                            if (getResponse.exists()) {
                                // only create the river if it exists, otherwise, the indexing meta data has not been visible yet...
                                createRiver(routing.riverName(), getResponse.sourceAsMap());
View Full Code Here

Examples of org.elasticsearch.river.routing.RiverRouting.riverName()

                if (rivers.containsKey(routing.riverName())) {
                    continue;
                }
                client.prepareGet(riverIndexName, routing.riverName().name(), "_meta").execute(new ActionListener<GetResponse>() {
                    @Override public void onResponse(GetResponse getResponse) {
                        if (!rivers.containsKey(routing.riverName())) {
                            if (getResponse.exists()) {
                                // only create the river if it exists, otherwise, the indexing meta data has not been visible yet...
                                createRiver(routing.riverName(), getResponse.sourceAsMap());
                            }
                        }
View Full Code Here

Examples of org.elasticsearch.river.routing.RiverRouting.riverName()

                client.prepareGet(riverIndexName, routing.riverName().name(), "_meta").execute(new ActionListener<GetResponse>() {
                    @Override public void onResponse(GetResponse getResponse) {
                        if (!rivers.containsKey(routing.riverName())) {
                            if (getResponse.exists()) {
                                // only create the river if it exists, otherwise, the indexing meta data has not been visible yet...
                                createRiver(routing.riverName(), getResponse.sourceAsMap());
                            }
                        }
                    }

                    @Override public void onFailure(Throwable e) {
View Full Code Here

Examples of org.elasticsearch.river.routing.RiverRouting.riverName()

                        // if its this is a failure that need to be retried, then do it
                        // this might happen if the state of the river index has not been propagated yet to this node, which
                        // should happen pretty fast since we managed to get the _meta in the RiversRouter
                        Throwable failure = ExceptionsHelper.unwrapCause(e);
                        if ((failure instanceof NoShardAvailableActionException) || (failure instanceof ClusterBlockException) || (failure instanceof IndexMissingException)) {
                            logger.debug("failed to get _meta from [{}]/[{}], retrying...", e, routing.riverName().type(), routing.riverName().name());
                            final ActionListener<GetResponse> listener = this;
                            threadPool.schedule(TimeValue.timeValueSeconds(5), ThreadPool.Names.SAME, new Runnable() {
                                @Override public void run() {
                                    client.prepareGet(riverIndexName, routing.riverName().name(), "_meta").execute(listener);
                                }
View Full Code Here

Examples of org.elasticsearch.river.routing.RiverRouting.riverName()

                        // if its this is a failure that need to be retried, then do it
                        // this might happen if the state of the river index has not been propagated yet to this node, which
                        // should happen pretty fast since we managed to get the _meta in the RiversRouter
                        Throwable failure = ExceptionsHelper.unwrapCause(e);
                        if ((failure instanceof NoShardAvailableActionException) || (failure instanceof ClusterBlockException) || (failure instanceof IndexMissingException)) {
                            logger.debug("failed to get _meta from [{}]/[{}], retrying...", e, routing.riverName().type(), routing.riverName().name());
                            final ActionListener<GetResponse> listener = this;
                            threadPool.schedule(TimeValue.timeValueSeconds(5), ThreadPool.Names.SAME, new Runnable() {
                                @Override public void run() {
                                    client.prepareGet(riverIndexName, routing.riverName().name(), "_meta").execute(listener);
                                }
View Full Code Here

Examples of org.elasticsearch.river.routing.RiverRouting.riverName()

                        if ((failure instanceof NoShardAvailableActionException) || (failure instanceof ClusterBlockException) || (failure instanceof IndexMissingException)) {
                            logger.debug("failed to get _meta from [{}]/[{}], retrying...", e, routing.riverName().type(), routing.riverName().name());
                            final ActionListener<GetResponse> listener = this;
                            threadPool.schedule(TimeValue.timeValueSeconds(5), ThreadPool.Names.SAME, new Runnable() {
                                @Override public void run() {
                                    client.prepareGet(riverIndexName, routing.riverName().name(), "_meta").execute(listener);
                                }
                            });
                        } else {
                            logger.warn("failed to get _meta from [{}]/[{}]", e, routing.riverName().type(), routing.riverName().name());
                        }
View Full Code Here

Examples of org.elasticsearch.river.routing.RiverRouting.riverName()

                                @Override public void run() {
                                    client.prepareGet(riverIndexName, routing.riverName().name(), "_meta").execute(listener);
                                }
                            });
                        } else {
                            logger.warn("failed to get _meta from [{}]/[{}]", e, routing.riverName().type(), routing.riverName().name());
                        }
                    }
                });
            }
        }
View Full Code Here

Examples of org.elasticsearch.river.routing.RiverRouting.riverName()

                                @Override public void run() {
                                    client.prepareGet(riverIndexName, routing.riverName().name(), "_meta").execute(listener);
                                }
                            });
                        } else {
                            logger.warn("failed to get _meta from [{}]/[{}]", e, routing.riverName().type(), routing.riverName().name());
                        }
                    }
                });
            }
        }
View Full Code Here

Examples of org.elasticsearch.river.routing.RiverRouting.riverName()

            }

            for (final RiverRouting routing : state.routing()) {
                // not allocated
                if (routing.node() == null) {
                    logger.trace("river {} has no routing node", routing.riverName().getName());
                    continue;
                }
                // only apply changes to the local node
                if (!routing.node().equals(localNode)) {
                    logger.trace("river {} belongs to node {}", routing.riverName().getName(), routing.node());
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.