Search in sources :

Example 1 with CumulativePageBucketReceiver

use of io.crate.execution.jobs.CumulativePageBucketReceiver in project crate by crate.

the class RemoteCollector method createPageDownstreamContext.

private RootTask.Builder createPageDownstreamContext() {
    RootTask.Builder builder = tasksService.newBuilder(jobId, sessionSettings.userName(), localNode, Collections.emptySet());
    PassThroughPagingIterator<Integer, Row> pagingIterator;
    if (scrollRequired) {
        pagingIterator = PassThroughPagingIterator.repeatable();
    } else {
        pagingIterator = PassThroughPagingIterator.oneShot();
    }
    PageBucketReceiver pageBucketReceiver = new CumulativePageBucketReceiver(localNode, RECEIVER_PHASE_ID, executor, DataTypes.getStreamers(collectPhase.outputTypes()), consumer, pagingIterator, 1);
    builder.addTask(new DistResultRXTask(RECEIVER_PHASE_ID, "RemoteCollectPhase", pageBucketReceiver, ramAccounting, 1));
    return builder;
}
Also used : CumulativePageBucketReceiver(io.crate.execution.jobs.CumulativePageBucketReceiver) PageBucketReceiver(io.crate.execution.jobs.PageBucketReceiver) Row(io.crate.data.Row) CumulativePageBucketReceiver(io.crate.execution.jobs.CumulativePageBucketReceiver) DistResultRXTask(io.crate.execution.jobs.DistResultRXTask) RootTask(io.crate.execution.jobs.RootTask)

Aggregations

Row (io.crate.data.Row)1 CumulativePageBucketReceiver (io.crate.execution.jobs.CumulativePageBucketReceiver)1 DistResultRXTask (io.crate.execution.jobs.DistResultRXTask)1 PageBucketReceiver (io.crate.execution.jobs.PageBucketReceiver)1 RootTask (io.crate.execution.jobs.RootTask)1