Package org.elasticsearch.action.support

Examples of org.elasticsearch.action.support.DefaultShardOperationFailedException


            } else if (shardResponse instanceof BroadcastShardOperationFailedException) {
                failedShards++;
                if (shardFailures == null) {
                    shardFailures = newArrayList();
                }
                shardFailures.add(new DefaultShardOperationFailedException((BroadcastShardOperationFailedException) shardResponse));
            } else if (shardResponse instanceof ShardSuggestResponse) {
                ShardSuggestResponse shardSuggestResponse = (ShardSuggestResponse) shardResponse;
                List<String> shardItems = shardSuggestResponse.suggestions();
                items.addAll(shardItems);
                successfulShards++;
View Full Code Here


            Object shardResponse = shardsResponses.get(i);
            if (shardResponse == null) {
                failedShards++;
            } else if (shardResponse instanceof BroadcastShardOperationFailedException) {
                failedShards++;
                shardFailures.add(new DefaultShardOperationFailedException((BroadcastShardOperationFailedException) shardResponse));
            } else {
                successfulShards++;
                successfulStatistics.add((ShardSuggestStatisticsResponse)shardResponse);
            }
        }
View Full Code Here

            if (shardResponse instanceof BroadcastShardOperationFailedException) {
                failedShards++;
                if (shardFailures == null) {
                    shardFailures = newLinkedList();
                }
                shardFailures.add(new DefaultShardOperationFailedException((BroadcastShardOperationFailedException) shardResponse));
            } else {
                successfulShards++;
                if (shardResponse instanceof ShardTermlistResponse) {
                    ShardTermlistResponse resp = (ShardTermlistResponse) shardResponse;
                    merge(map, resp.getTermList());
View Full Code Here

        SettableFuture<QueryResult> result = SettableFuture.create();
        ESCountTask.CountResponseListener listener = new ESCountTask.CountResponseListener(result);


        ShardOperationFailedException[] shardFailures = new ShardOperationFailedException[] {
                new DefaultShardOperationFailedException("dummy", 2,
                        new IndexShardException(new ShardId("dummy", 2), "dummy message"))
        };
        CountResponse countResponse = mock(CountResponse.class);
        when(countResponse.getFailedShards()).thenReturn(1);
        when(countResponse.getShardFailures()).thenReturn(shardFailures);
View Full Code Here

                    BroadcastShardOperationFailedException) {
                failedShards++;
                if (shardFailures == null) {
                    shardFailures = newArrayList();
                }
                shardFailures.add(new DefaultShardOperationFailedException(
                        (BroadcastShardOperationFailedException)
                                shardResponse));
            } else {
                responses.add((ShardSearchIntoResponse) shardResponse);
                successfulShards++;
View Full Code Here

            } else if (shardResponse instanceof BroadcastShardOperationFailedException) {
                failedShards++;
                if (shardFailures == null) {
                    shardFailures = newArrayList();
                }
                shardFailures.add(new DefaultShardOperationFailedException((BroadcastShardOperationFailedException) shardResponse));
            } else {
                responses.add((ShardExportResponse) shardResponse);
                successfulShards++;
            }
        }
View Full Code Here

            } else if (shardResponse instanceof BroadcastShardOperationFailedException) {
                failedShards++;
                if (shardFailures == null) {
                    shardFailures = newArrayList();
                }
                shardFailures.add(new DefaultShardOperationFailedException((BroadcastShardOperationFailedException) shardResponse));
            } else {
                PercolateShardResponse percolateShardResponse = (PercolateShardResponse) shardResponse;
                successfulShards++;
                if (!percolateShardResponse.isEmpty()) {
                    if (shardResults == null) {
View Full Code Here

            } else if (shardResponse instanceof BroadcastShardOperationFailedException) {
                failedShards++;
                if (shardFailures == null) {
                    shardFailures = newArrayList();
                }
                shardFailures.add(new DefaultShardOperationFailedException((BroadcastShardOperationFailedException) shardResponse));
            } else {
                Suggest suggest = ((ShardSuggestResponse) shardResponse).getSuggest();
                Suggest.group(groupedSuggestions, suggest);
                successfulShards++;
            }
View Full Code Here

            } else if (shardResponse instanceof BroadcastShardOperationFailedException) {
                failedShards++;
                if (shardFailures == null) {
                    shardFailures = newArrayList();
                }
                shardFailures.add(new DefaultShardOperationFailedException((BroadcastShardOperationFailedException) shardResponse));
            } else {
                dfsResults.set(i, ((ShardDfsOnlyResponse) shardResponse).getDfsSearchResult());
                successfulShards++;
            }
        }
View Full Code Here

            } else if (shardResponse instanceof BroadcastShardOperationFailedException) {
                failedShards++;
                if (shardFailures == null) {
                    shardFailures = newArrayList();
                }
                shardFailures.add(new DefaultShardOperationFailedException((BroadcastShardOperationFailedException) shardResponse));
            } else {
                successfulShards++;
                if ((exists = ((ShardExistsResponse) shardResponse).exists())) {
                    successfulShards = shardsResponses.length() - failedShards;
                    break;
View Full Code Here

TOP

Related Classes of org.elasticsearch.action.support.DefaultShardOperationFailedException

Copyright © 2018 www.massapicom. 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.