Search in sources :

Example 11 with IPushRuntimeFactory

use of org.apache.hyracks.algebricks.runtime.base.IPushRuntimeFactory in project asterixdb by apache.

the class SubplanRuntimeFactory method toString.

@Override
public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("Subplan { \n");
    for (IPushRuntimeFactory f : pipeline.getRuntimeFactories()) {
        sb.append("  " + f.toString() + ";\n");
    }
    sb.append("}");
    return sb.toString();
}
Also used : IPushRuntimeFactory(org.apache.hyracks.algebricks.runtime.base.IPushRuntimeFactory)

Example 12 with IPushRuntimeFactory

use of org.apache.hyracks.algebricks.runtime.base.IPushRuntimeFactory in project asterixdb by apache.

the class NestedPlansAccumulatingAggregatorFactory method assemblePipeline.

private IFrameWriter assemblePipeline(AlgebricksPipeline subplan, IFrameWriter writer, IHyracksTaskContext ctx) throws HyracksDataException {
    // plug the operators
    IFrameWriter start = writer;
    IPushRuntimeFactory[] runtimeFactories = subplan.getRuntimeFactories();
    RecordDescriptor[] recordDescriptors = subplan.getRecordDescriptors();
    for (int i = runtimeFactories.length - 1; i >= 0; i--) {
        IPushRuntime newRuntime = runtimeFactories[i].createPushRuntime(ctx);
        newRuntime.setFrameWriter(0, start, recordDescriptors[i]);
        if (i > 0) {
            newRuntime.setInputRecordDescriptor(0, recordDescriptors[i - 1]);
        } else {
            // the nts has the same input and output rec. desc.
            newRuntime.setInputRecordDescriptor(0, recordDescriptors[0]);
        }
        start = newRuntime;
    }
    return start;
}
Also used : IFrameWriter(org.apache.hyracks.api.comm.IFrameWriter) RecordDescriptor(org.apache.hyracks.api.dataflow.value.RecordDescriptor) IPushRuntime(org.apache.hyracks.algebricks.runtime.base.IPushRuntime) IPushRuntimeFactory(org.apache.hyracks.algebricks.runtime.base.IPushRuntimeFactory)

Aggregations

IPushRuntimeFactory (org.apache.hyracks.algebricks.runtime.base.IPushRuntimeFactory)12 RecordDescriptor (org.apache.hyracks.api.dataflow.value.RecordDescriptor)8 AlgebricksPartitionConstraint (org.apache.hyracks.algebricks.common.constraints.AlgebricksPartitionConstraint)5 ILogicalOperator (org.apache.hyracks.algebricks.core.algebra.base.ILogicalOperator)5 AlgebricksAbsolutePartitionConstraint (org.apache.hyracks.algebricks.common.constraints.AlgebricksAbsolutePartitionConstraint)3 ArrayList (java.util.ArrayList)2 List (java.util.List)2 Pair (org.apache.hyracks.algebricks.common.utils.Pair)2 LogicalVariable (org.apache.hyracks.algebricks.core.algebra.base.LogicalVariable)2 IPushRuntime (org.apache.hyracks.algebricks.runtime.base.IPushRuntime)2 AlgebricksMetaOperatorDescriptor (org.apache.hyracks.algebricks.runtime.operators.meta.AlgebricksMetaOperatorDescriptor)2 IFrameWriter (org.apache.hyracks.api.comm.IFrameWriter)2 HashMap (java.util.HashMap)1 Map (java.util.Map)1 LSMTreeInsertDeleteOperatorDescriptor (org.apache.asterix.common.dataflow.LSMTreeInsertDeleteOperatorDescriptor)1 JobId (org.apache.asterix.common.transactions.JobId)1 FeedConnectionId (org.apache.asterix.external.feed.management.FeedConnectionId)1 FeedCollectOperatorDescriptor (org.apache.asterix.external.operators.FeedCollectOperatorDescriptor)1 FeedIntakeOperatorDescriptor (org.apache.asterix.external.operators.FeedIntakeOperatorDescriptor)1 FeedMetaOperatorDescriptor (org.apache.asterix.external.operators.FeedMetaOperatorDescriptor)1