private void addUncommittedStatementIndexes(Collection<RowMutationState> rowMutations) { for (RowMutationState rowMutationState : rowMutations) { uncommittedStatementIndexes = joinSortedIntArrays(uncommittedStatementIndexes, rowMutationState.getStatementIndexes()); } }
@Override public Long getEstimateInfoTimestamp() throws SQLException { if (!getEstimatesCalled) { getEstimates(); } return estimateInfoTimestamp; }
@Override public Long getEstimatedBytesToScan() throws SQLException { if (!getEstimatesCalled) { getEstimates(); } return estimatedBytes; }
public UnnestArrayResultIterator(ResultIterator iterator) { super(iterator); this.elemRefExpression = new UnnestArrayElemRefExpression(arrayExpression); this.elemIndexExpression = withOrdinality ? new UnnestArrayElemIndexExpression() : null; this.projector = new TupleProjector(withOrdinality ? new Expression[] {elemRefExpression, elemIndexExpression} : new Expression[] {elemRefExpression}); this.arrayPtr = new ImmutableBytesWritable(); this.length = 0; this.index = 0; this.closed = false; }
@Override public ResultIterator iterator(ParallelScanGrouper scanGrouper, Scan scan) throws SQLException { return type == JoinType.Semi || type == JoinType.Anti ? new SemiAntiJoinIterator(lhsPlan.iterator(scanGrouper), rhsPlan.iterator(scanGrouper)) : new BasicJoinIterator(lhsPlan.iterator(scanGrouper), rhsPlan.iterator(scanGrouper)); }
public ChunkedResultIteratorFactory(ParallelIteratorFactory delegateFactory, MutationState mutationState, TableRef tableRef) { this.delegateFactory = delegateFactory; this.tableRef = tableRef; // Clone MutationState, as the one on the connection may change if auto commit is on // while we need a handle to the original one (for it's transaction state). this.mutationState = new MutationState(mutationState); }
@Override public Long getEstimatedRowsToScan() throws SQLException { if (!getEstimatesCalled) { getEstimates(); } return estimatedRows; }
@Override public Long getEstimatedBytesToScan() throws SQLException { if (!getEstimatesCalled) { getEstimates(); } return estimatedBytes; }
@Override public Long getEstimatedBytesToScan() throws SQLException { if (isSerial) { return serialBytesEstimate; } return super.getEstimatedBytesToScan(); }
@Override public Long getEstimateInfoTimestamp() throws SQLException { if (isSerial) { return serialEstimateInfoTs; } return super.getEstimateInfoTimestamp(); } }
/** * Lexicographically compare two byte arrays. */ public static int compareTo(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) { return LexicographicalComparerHolder.BEST_COMPARER.compareTo(b1, s1, l1, b2, s2, l2); }
@Override public void close() throws SQLException { SQLException e = closeIterators(lhsIterator, rhsIterator); queue.close(); if (e != null) { throw e; } }
@Override public boolean equals(Object other) { if (!(other instanceof JoinKey)) return false; return this.compareTo((JoinKey) other) == 0; }
@Override public ServerCache call() throws Exception { ServerCache cache = subPlans[index].execute(HashJoinPlan.this); return cache; }
@Override protected MutationState newMutationState(int maxSize, int maxSizeBytes) { return new MutationState(maxSize, maxSizeBytes, this, mutations, false, null); }; };
@Override public Long getEstimatedRowsToScan() throws SQLException { if (!getEstimatesCalled) { getEstimates(); } return estimatedRows; }
@Override public Long getEstimatedRowsToScan() throws SQLException { if (!getEstimatesCalled) { getEstimates(); } return estimatedRows; }
@Override public Long getEstimateInfoTimestamp() throws SQLException { if (!getEstimatesCalled) { getEstimates(); } return estimateInfoTs; }
@Override public Long getEstimateInfoTimestamp() throws SQLException { if (!getEstimatesCalled) { getEstimates(); } return estimateInfoTs; }
@Override public Long getEstimatedBytesToScan() throws SQLException { if (!getEstimatesCalled) { getEstimates(); } return estimatedSize; }