use of org.apache.hyracks.control.nc.resources.memory.FrameManager in project asterixdb by apache.
the class FrameFixedFieldTupleAppenderTest method createAppender.
@Before
public void createAppender() throws HyracksDataException {
appender = new FrameFixedFieldAppender(fields.length);
FrameManager manager = new FrameManager(TEST_FRAME_SIZE);
IFrame frame = new VSizeFrame(manager);
appender.reset(frame, true);
}
use of org.apache.hyracks.control.nc.resources.memory.FrameManager in project asterixdb by apache.
the class FrameFixedFieldTupleAppenderTest method prepareData.
private IFrameTupleAccessor prepareData(DATA_TYPE type) throws HyracksDataException {
IFrameTupleAccessor accessor = new FrameTupleAccessor(recordDescriptor);
IFrameTupleAppender appender = new FrameTupleAppender(new VSizeFrame(new FrameManager(INPUT_BUFFER_SIZE)), true);
int i = 0;
do {
switch(type) {
case NORMAL_RECORD:
makeATuple(tupleBuilder, i++);
break;
case ONE_FIELD_LONG:
makeASizeUpTuple(tupleBuilder, i++);
break;
case ONE_RECORD_LONG:
makeABigObjectTuple(tupleBuilder, i++);
break;
}
} while (appender.append(tupleBuilder.getFieldEndOffsets(), tupleBuilder.getByteArray(), 0, tupleBuilder.getSize()));
accessor.reset(appender.getBuffer());
return accessor;
}
Aggregations