use of org.apache.parquet.column.values.ValuesWriter in project parquet-mr by apache.
the class BenchmarkReadingRandomIntegers method prepare.
@BeforeClass
public static void prepare() throws IOException {
Random random = new Random();
data = new int[100000 * blockSize];
for (int i = 0; i < data.length; i++) {
data[i] = random.nextInt(100) - 200;
}
ValuesWriter delta = new DeltaBinaryPackingValuesWriterForInteger(blockSize, miniBlockNum, 100, 20000, new DirectByteBufferAllocator());
ValuesWriter rle = new RunLengthBitPackingHybridValuesWriter(32, 100, 20000, new DirectByteBufferAllocator());
for (int i = 0; i < data.length; i++) {
delta.writeInteger(data[i]);
rle.writeInteger(data[i]);
}
deltaBytes = delta.getBytes().toByteArray();
rleBytes = rle.getBytes().toByteArray();
}
Aggregations