}
MemoryManagerWithForceFlush memory = new MemoryManagerWithForceFlush(conf);
ReaderWriterProfiler.setProfilerOptions(conf);
Writer writer = new WriterImpl(fs, testFilePath, conf, inspector,
1000000, CompressionKind.NONE, 100, 1000, memory);
writer.addRow(new IntStruct(1));
writer.addRow(new IntStruct(2));
writer.addRow(new IntStruct(3));
for (int i = 0; i < 997; i++) {
writer.addRow(new IntStruct(123));
}
memory.forceFlushStripe();
for (int i = 0; i < 1000; i++) {
writer.addRow(new IntStruct(123));
}
memory.forceFlushStripe();
writer.addRow(new IntStruct(1));
writer.addRow(new IntStruct(2));
writer.addRow(new IntStruct(3));
for (int i = 0; i < 997; i++) {
writer.addRow(new IntStruct(123));
}
writer.close();
Reader reader = OrcFile.createReader(fs, testFilePath, conf);
RecordReader rows = reader.rows(null);
OrcLazyStruct lazyRow = null;