use of org.apache.parquet.column.values.delta.DeltaBinaryPackingValuesWriter in project parquet-mr by apache.
the class BenchmarkIntegerOutputSize method testRandomIntegers.
public void testRandomIntegers(IntFunc func, int bitWidth) {
DeltaBinaryPackingValuesWriter delta = new DeltaBinaryPackingValuesWriterForInteger(blockSize, miniBlockNum, 100, 20000, new DirectByteBufferAllocator());
RunLengthBitPackingHybridValuesWriter rle = new RunLengthBitPackingHybridValuesWriter(bitWidth, 100, 20000, new DirectByteBufferAllocator());
for (int i = 0; i < dataSize; i++) {
int v = func.getIntValue();
delta.writeInteger(v);
rle.writeInteger(v);
}
System.out.println("delta size: " + delta.getBytes().size());
System.out.println("estimated size" + estimatedSize());
System.out.println("rle size: " + rle.getBytes().size());
}
use of org.apache.parquet.column.values.delta.DeltaBinaryPackingValuesWriter in project parquet-mr by apache.
the class RandomWritingBenchmarkTest method writeDeltaPackingTest2.
@BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 2)
@Test
public void writeDeltaPackingTest2() {
DeltaBinaryPackingValuesWriter writer = new DeltaBinaryPackingValuesWriterForInteger(blockSize, miniBlockNum, 100, 20000, new DirectByteBufferAllocator());
runWriteTest(writer);
}
use of org.apache.parquet.column.values.delta.DeltaBinaryPackingValuesWriter in project parquet-mr by apache.
the class RandomWritingBenchmarkTest method writeDeltaPackingTest.
@BenchmarkOptions(benchmarkRounds = 10, warmupRounds = 2)
@Test
public void writeDeltaPackingTest() {
DeltaBinaryPackingValuesWriter writer = new DeltaBinaryPackingValuesWriterForInteger(blockSize, miniBlockNum, 100, 20000, new DirectByteBufferAllocator());
runWriteTest(writer);
}
Aggregations