use of org.apache.hyracks.dataflow.common.comm.io.FrameTupleAppender in project asterixdb by apache.
the class FeedTupleForwarder method initialize.
@Override
public void initialize(IHyracksTaskContext ctx, IFrameWriter writer) throws HyracksDataException {
if (!initialized) {
this.frame = new VSizeFrame(ctx);
this.writer = writer;
this.appender = new FrameTupleAppender(frame);
initialized = true;
}
}
use of org.apache.hyracks.dataflow.common.comm.io.FrameTupleAppender in project asterixdb by apache.
the class FrameFullTupleForwarder method initialize.
@Override
public void initialize(IHyracksTaskContext ctx, IFrameWriter writer) throws HyracksDataException {
this.appender = new FrameTupleAppender();
this.frame = new VSizeFrame(ctx);
this.writer = writer;
appender.reset(frame, true);
}
use of org.apache.hyracks.dataflow.common.comm.io.FrameTupleAppender in project asterixdb by apache.
the class RateControlledTupleForwarder method initialize.
@Override
public void initialize(IHyracksTaskContext ctx, IFrameWriter writer) throws HyracksDataException {
this.appender = new FrameTupleAppender();
this.frame = new VSizeFrame(ctx);
this.writer = writer;
appender.reset(frame, true);
}
use of org.apache.hyracks.dataflow.common.comm.io.FrameTupleAppender in project asterixdb by apache.
the class OptimizedHybridHashJoin method flushBigProbeObjectToDisk.
private void flushBigProbeObjectToDisk(int pid, FrameTupleAccessor accessorProbe, int i) throws HyracksDataException {
if (bigProbeFrameAppender == null) {
bigProbeFrameAppender = new FrameTupleAppender(new VSizeFrame(ctx));
}
RunFileWriter runFileWriter = getSpillWriterOrCreateNewOneIfNotExist(pid, SIDE.PROBE);
if (!bigProbeFrameAppender.append(accessorProbe, i)) {
throw new HyracksDataException("The given tuple is too big");
}
bigProbeFrameAppender.write(runFileWriter, true);
}
use of org.apache.hyracks.dataflow.common.comm.io.FrameTupleAppender in project asterixdb by apache.
the class RunMergingFrameReader method open.
@Override
public void open() throws HyracksDataException {
tupleCount = 0;
tupleAccessors = new IFrameTupleAccessor[runCursors.size()];
outFrameAppender = new FrameTupleAppender();
Comparator<ReferenceEntry> comparator = createEntryComparator(comparators);
topTuples = new ReferencedPriorityQueue(runCursors.size(), comparator, sortFields, nmkComputer);
tupleIndexes = new int[runCursors.size()];
for (int i = 0; i < runCursors.size(); i++) {
tupleIndexes[i] = 0;
int runIndex = topTuples.peek().getRunid();
runCursors.get(runIndex).open();
if (runCursors.get(runIndex).nextFrame(inFrames.get(runIndex))) {
tupleAccessors[runIndex] = new GroupFrameAccessor(ctx.getInitialFrameSize(), recordDesc);
tupleAccessors[runIndex].reset(inFrames.get(runIndex).getBuffer());
setNextTopTuple(runIndex, tupleIndexes, runCursors, inFrames, tupleAccessors, topTuples);
} else {
closeRun(runIndex, runCursors, tupleAccessors);
topTuples.pop();
}
}
}
Aggregations