private void makeWithSerde(final int chunkSize) throws IOException { CloseQuietly.close(columnarInts); ByteArrayOutputStream baos = new ByteArrayOutputStream(); final CompressedVSizeColumnarIntsSupplier theSupplier = CompressedVSizeColumnarIntsSupplier.fromList( IntArrayList.wrap(vals), Ints.max(vals), chunkSize, byteOrder, compressionStrategy, closer ); theSupplier.writeTo(Channels.newChannel(baos), null); final byte[] bytes = baos.toByteArray(); Assert.assertEquals(theSupplier.getSerializedSize(), bytes.length); supplier = CompressedVSizeColumnarIntsSupplier.fromByteBuffer(ByteBuffer.wrap(bytes), byteOrder); columnarInts = supplier.get(); }
@Override public ColumnarMultiInts get() { return new CompressedVSizeColumnarMultiIntsSupplier.CompressedVSizeColumnarMultiInts( offsetSupplier.get(), valueSupplier.get() ); }
byteOrder ); ColumnarInts columnarInts = supplierFromByteBuffer.get(); for (int i = 0; i < vals.length; ++i) { assertEquals(vals[i], columnarInts.get(i));
bufferCompressed, ByteOrder.nativeOrder() ).get();
private void setupSimple(final int chunkSize) { CloseQuietly.close(columnarInts); vals = new int[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16}; supplier = CompressedVSizeColumnarIntsSupplier.fromList( IntArrayList.wrap(vals), Ints.max(vals), chunkSize, ByteOrder.nativeOrder(), compressionStrategy, closer ); columnarInts = supplier.get(); }
final ColumnarInts columnarInts2 = supplier.get(); try { new Thread(new Runnable()
); ColumnarInts columnarInts = supplierFromByteBuffer.get(); for (int i = 0; i < vals.length; ++i) { assertEquals(vals[i], columnarInts.get(i));
@Override public ColumnarMultiInts get() { return new CompressedVSizeColumnarMultiIntsSupplier.CompressedVSizeColumnarMultiInts( offsetSupplier.get(), valueSupplier.get() ); }