private ResultMessage.Rows processResults(PartitionIterator partitions, QueryOptions options, int nowInSec, int userLimit) throws RequestValidationException { ResultSet rset = process(partitions, options, nowInSec, userLimit); return new ResultMessage.Rows(rset); }
private ResultMessage.Rows processResults(PartitionIterator partitions, QueryOptions options, int nowInSec, int userLimit) throws RequestValidationException { ResultSet rset = process(partitions, options, nowInSec, userLimit); return new ResultMessage.Rows(rset); }
public ResultSet process(PartitionIterator partitions, int nowInSec) throws InvalidRequestException { return process(partitions, QueryOptions.DEFAULT, nowInSec, getLimit(QueryOptions.DEFAULT)); }
public ResultSet process(List<Row> rows) throws InvalidRequestException { assert !parameters.isCount; // not yet needed QueryOptions options = QueryOptions.DEFAULT; return process(rows, options, getLimit(options), System.currentTimeMillis()); }
private ResultMessage.Rows processResults(PartitionIterator partitions, QueryOptions options, int nowInSec, int userLimit) throws RequestValidationException { ResultSet rset = process(partitions, options, nowInSec, userLimit); return new ResultMessage.Rows(rset); }
public ResultSet process(PartitionIterator partitions, int nowInSec) throws InvalidRequestException { return process(partitions, QueryOptions.DEFAULT, nowInSec, getLimit(QueryOptions.DEFAULT)); }
public ResultSet process(PartitionIterator partitions, int nowInSec) throws InvalidRequestException { return process(partitions, QueryOptions.DEFAULT, nowInSec, getLimit(QueryOptions.DEFAULT)); }
public ResultMessage.Rows processResults(List<Row> rows, QueryOptions options, int limit, long now) throws RequestValidationException { // Even for count, we need to process the result as it'll group some column together in sparse column families ResultSet rset = process(rows, options, limit, now); rset = parameters.isCount ? rset.makeCountResult(parameters.countAlias) : rset; return new ResultMessage.Rows(rset); }
public static UntypedResultSet resultify(String query, List<Row> rows) { try { SelectStatement ss = (SelectStatement) getStatement(query, null).statement; ResultSet cqlRows = ss.process(rows); return UntypedResultSet.create(cqlRows); } catch (RequestValidationException e) { throw new AssertionError(e); } }
protected Row computeNext() { try { while (currentPage == null || !currentPage.hasNext()) { if (pager.isExhausted()) return endOfData(); currentPage = select.process(pager.fetchPage(pageSize)).rows.iterator(); } return new Row(metadata, currentPage.next()); } catch (RequestValidationException | RequestExecutionException e) { throw new RuntimeException(e); } } };
public static UntypedResultSet resultify(String query, PartitionIterator partitions) { try (PartitionIterator iter = partitions) { SelectStatement ss = (SelectStatement) getStatement(query, null).statement; ResultSet cqlRows = ss.process(iter, FBUtilities.nowInSeconds()); return UntypedResultSet.create(cqlRows); } }
public static UntypedResultSet resultify(String query, PartitionIterator partitions) { try (PartitionIterator iter = partitions) { SelectStatement ss = (SelectStatement) getStatement(query, null).statement; ResultSet cqlRows = ss.process(iter, FBUtilities.nowInSeconds()); return UntypedResultSet.create(cqlRows); } }
public static UntypedResultSet resultify(String query, PartitionIterator partitions) { try (PartitionIterator iter = partitions) { SelectStatement ss = (SelectStatement) getStatement(query, null).statement; ResultSet cqlRows = ss.process(iter, FBUtilities.nowInSeconds()); return UntypedResultSet.create(cqlRows); } }
protected Row computeNext() { int nowInSec = FBUtilities.nowInSeconds(); while (currentPage == null || !currentPage.hasNext()) { if (pager.isExhausted()) return endOfData(); try (ReadExecutionController executionController = pager.executionController(); PartitionIterator iter = pager.fetchPageInternal(pageSize, executionController)) { currentPage = select.process(iter, nowInSec).rows.iterator(); } } return new Row(metadata, currentPage.next()); } };
protected Row computeNext() { int nowInSec = FBUtilities.nowInSeconds(); while (currentPage == null || !currentPage.hasNext()) { if (pager.isExhausted()) return endOfData(); try (ReadExecutionController executionController = pager.executionController(); PartitionIterator iter = pager.fetchPageInternal(pageSize, executionController)) { currentPage = select.process(iter, nowInSec).rows.iterator(); } } return new Row(metadata, currentPage.next()); } };
protected Row computeNext() { int nowInSec = FBUtilities.nowInSeconds(); while (currentPage == null || !currentPage.hasNext()) { if (pager.isExhausted()) return endOfData(); try (ReadExecutionController executionController = pager.executionController(); PartitionIterator iter = pager.fetchPageInternal(pageSize, executionController)) { currentPage = select.process(iter, nowInSec).rows.iterator(); } } return new Row(metadata, currentPage.next()); } };
private ResultMessage.Rows pageCountQuery(QueryPager pager, QueryOptions options, int pageSize, long now, int limit) throws RequestValidationException, RequestExecutionException { int count = 0; while (!pager.isExhausted()) { int maxLimit = pager.maxRemaining(); logger.debug("New maxLimit for paged count query is {}", maxLimit); ResultSet rset = process(pager.fetchPage(pageSize), options, maxLimit, now); count += rset.rows.size(); } // We sometimes query one more result than the user limit asks to handle exclusive bounds with compact tables (see updateLimitForQuery). // So do make sure the count is not greater than what the user asked for. ResultSet result = ResultSet.makeCountResult(keyspace(), columnFamily(), Math.min(count, limit), parameters.countAlias); return new ResultMessage.Rows(result); }