Package io.crate.executor

Examples of io.crate.executor.QueryResult


            rows[i] = new Object[]{
                    d % 4,
                    aggState
            };
        }
        return Futures.immediateFuture((TaskResult) new QueryResult(rows));
    }
View Full Code Here


    @Override
    public void start() {
        Futures.addCallback(collectOperation.collect(collectNode), new FutureCallback<Object[][]>() {
            @Override
            public void onSuccess(@Nullable Object[][] rows) {
                result.set(new QueryResult(rows));
            }

            @Override
            public void onFailure(@Nonnull Throwable t) {
                result.setException(t);
View Full Code Here

        Futures.addCallback(mergeOperation.result(), new FutureCallback<Object[][]>() {
            @Override
            public void onSuccess(@Nullable Object[][] rows) {
                statsTables.operationFinished(operationId, null);
                result.set(new QueryResult(rows));
            }

            @Override
            public void onFailure(@Nonnull Throwable t) {
                statsTables.operationFinished(operationId, Exceptions.messageOf(t));
View Full Code Here

                            rows[r] = new Object[numColumns];
                            for (int c = 0; c < numColumns; c++) {
                                rows[r][c] = extractor[c].extract(hits[r]);
                            }
                        }
                        result.set(new QueryResult(rows));
                    } catch (Throwable t) {
                        result.setException(t);
                    } finally {
                        releaseIrrelevantSearchContexts(firstResults, docIdsToLoad);
                    }
View Full Code Here

                downstream = projectorChain.firstProjector();
                downstream.registerUpstream(this);
                Futures.addCallback(projectorChain.result(), new FutureCallback<Object[][]>() {
                    @Override
                    public void onSuccess(@Nullable Object[][] rows) {
                        result.set(new QueryResult(rows));
                    }

                    @Override
                    public void onFailure(@Nonnull Throwable t) {
                        result.setException(t);
View Full Code Here

                        c++;
                    }
                    rows.add(row);
                }

                result.set(new QueryResult(rows.toArray(new Object[rows.size()][])));
            } else {
                projectorChain.startProjections();
                try {
                    for (MultiGetItemResponse response : responses) {
                        if (response.isFailed() || !response.getResponse().isExists()) {
View Full Code Here

                 */
                rows[0][c] = extractor.extract(response);
                c++;
            }

            result.set(new QueryResult(rows));
        }
View Full Code Here

        @Override
        public void onResponse(CountResponse countResponse) {
            if (countResponse.getFailedShards() > 0) {
                onFailure(new FailedShardsException(countResponse.getShardFailures()));
            } else {
                result.set(new QueryResult(new Object[][] { new Object[] {countResponse.getCount() }}));
            }
        }
View Full Code Here

            transportMergeNodeAction.startMerge(node, request, new ActionListener<NodeMergeResponse>() {

                @Override
                public void onResponse(NodeMergeResponse nodeMergeResponse) {
                    logger.trace("startMerge.onResponse: {} of {}", node, mergeNode.executionNodes().size());
                    ((SettableFuture<QueryResult>)results.get(resultIdx)).set(new QueryResult(nodeMergeResponse.rows()));
                }

                @Override
                public void onFailure(Throwable e) {
                    logger.trace("startMerge.onFailure: {} of {}", node, mergeNode.executionNodes().size());
View Full Code Here

                    nodeIds[i],
                    request,
                    new ActionListener<NodeCollectResponse>() {
                        @Override
                        public void onResponse(NodeCollectResponse response) {
                            ((SettableFuture<QueryResult>)result.get(resultIdx)).set(new QueryResult(response.rows()));
                        }

                        @Override
                        public void onFailure(Throwable e) {
                            ((SettableFuture<QueryResult>)result.get(resultIdx)).setException(e);
View Full Code Here

TOP

Related Classes of io.crate.executor.QueryResult

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.