@Override public BaseRowIterator<T> applyToPartition(BaseRowIterator<T> partition) { currentKey = partition.partitionKey(); // If this is the first partition of this page, this could be the continuation of a partition we've started // on the previous page. In which case, we could have the problem that the partition has no more "regular" // rows (but the page size is such we didn't knew before) but it does has a static row. We should then skip // the partition as returning it would means to the upper layer that the partition has "only" static columns, // which is not the case (and we know the static results have been sent on the previous page). if (isFirstPartition) { isFirstPartition = false; if (isPreviouslyReturnedPartition(currentKey) && !partition.hasNext()) { partition.close(); return null; } } return apply(partition); }
@Override public BaseRowIterator<T> applyToPartition(BaseRowIterator<T> partition) { currentKey = partition.partitionKey(); // If this is the first partition of this page, this could be the continuation of a partition we've started // on the previous page. In which case, we could have the problem that the partition has no more "regular" // rows (but the page size is such we didn't knew before) but it does has a static row. We should then skip // the partition as returning it would means to the upper layer that the partition has "only" static columns, // which is not the case (and we know the static results have been sent on the previous page). if (isFirstPartition) { isFirstPartition = false; if (isPreviouslyReturnedPartition(currentKey) && !partition.hasNext()) { partition.close(); return null; } } return apply(partition); }
@Override public BaseRowIterator<T> applyToPartition(BaseRowIterator<T> partition) { currentKey = partition.partitionKey(); // If this is the first partition of this page, this could be the continuation of a partition we've started // on the previous page. In which case, we could have the problem that the partition has no more "regular" // rows (but the page size is such we didn't knew before) but it does has a static row. We should then skip // the partition as returning it would means to the upper layer that the partition has "only" static columns, // which is not the case (and we know the static results have been sent on the previous page). if (isFirstPartition) { isFirstPartition = false; if (isPreviouslyReturnedPartition(currentKey) && !partition.hasNext()) { partition.close(); return null; } } return apply(partition); }
int len = length; while (!stop.isSignalled && !stopChild.isSignalled && input.hasNext())
int len = length; while (!stop.isSignalled && !stopChild.isSignalled && input.hasNext())
int len = length; while (!stop.isSignalled && input.hasNext())
int len = length; while (!stop.isSignalled && !stopChild.isSignalled && input.hasNext())