private void init() throws HyracksDataException { Queue<Pair<Pair<IActivity, Integer>, Pair<IActivity, Integer>>> childQueue = new LinkedList<>(); List<IConnectorDescriptor> outputConnectors; final boolean enforce = ctx.getJobFlags().contains(JobFlag.ENFORCE_CONTRACT);
new RunningAggregatorOutput(ctx, subplans, keyFieldIdx.length + decorFieldIdx.length, writer); boolean enforce = ctx.getJobFlags().contains(JobFlag.ENFORCE_CONTRACT); IFrameWriter enforcedWriter = enforce ? EnforceFrameWriter.enforce(outputWriter) : outputWriter; final NestedTupleSourceRuntime[] pipelines = new NestedTupleSourceRuntime[subplans.length];
public IFrameWriter assemblePipeline(IFrameWriter writer, IHyracksTaskContext ctx) throws HyracksDataException { boolean enforce = ctx.getJobFlags().contains(JobFlag.ENFORCE_CONTRACT);
public static IFrameWriter assemblePipeline(AlgebricksPipeline subplan, IFrameWriter writer, IHyracksTaskContext ctx) throws HyracksDataException { // should enforce protocol boolean enforce = ctx.getJobFlags().contains(JobFlag.ENFORCE_CONTRACT); // 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)[0]; newRuntime = enforce ? EnforcePushRuntime.enforce(newRuntime) : newRuntime; start = enforce ? EnforceFrameWriter.enforce(start) : start; newRuntime.setOutputFrameWriter(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; } }