@Override public void open() throws IOException { writer = CompressionFactory.getFloatSerializer( segmentWriteOutMedium, StringUtils.format("%s.float_column", filenameBase), byteOrder, compression ); writer.open(); }
@Override public void open() throws IOException { writer = CompressionFactory.getLongSerializer( segmentWriteOutMedium, StringUtils.format("%s.long_column", filenameBase), byteOrder, encoding, compression ); writer.open(); }
if (versionFromBuffer == VERSION) { byte compressionId = buffer.get(); if (CompressionFactory.hasEncodingFlag(compressionId)) { encoding = CompressionFactory.LongEncodingFormat.forId(buffer.get()); compressionId = CompressionFactory.clearEncodingFlag(compressionId); Supplier<ColumnarLongs> supplier = CompressionFactory.getLongSupplier( totalSize, sizePer,
@Override public void open() throws IOException { writer = CompressionFactory.getDoubleSerializer( segmentWriteOutMedium, StringUtils.format("%s.double_column", filenameBase), byteOrder, compression ); writer.open(); }
@Override public void putMeta(ByteBuffer metaOut, CompressionStrategy strategy) { metaOut.put(CompressionFactory.setEncodingFlag(strategy.getId())); metaOut.put(CompressionFactory.LongEncodingFormat.DELTA.getId()); metaOut.put(CompressionFactory.DELTA_ENCODING_VERSION); metaOut.putLong(base); metaOut.putInt(bitsPerValue); }
public static byte setEncodingFlag(byte strategyId) { return hasEncodingFlag(strategyId) ? strategyId : (byte) (strategyId - FLAG_VALUE); }
public static Supplier<ColumnarDoubles> fromByteBuffer( ByteBuffer buffer, ByteOrder order ) { byte versionFromBuffer = buffer.get(); if (versionFromBuffer == LZF_VERSION || versionFromBuffer == VERSION) { final int totalSize = buffer.getInt(); final int sizePer = buffer.getInt(); CompressionStrategy compression = CompressionStrategy.LZF; if (versionFromBuffer == VERSION) { byte compressionId = buffer.get(); compression = CompressionStrategy.forId(compressionId); } return CompressionFactory.getDoubleSupplier( totalSize, sizePer, buffer.asReadOnlyBuffer(), order, compression ); } throw new IAE("Unknown version[%s]", versionFromBuffer); } }
compression = CompressionStrategy.forId(compressionId); Supplier<ColumnarFloats> supplier = CompressionFactory.getFloatSupplier( totalSize, sizePer,
@Override public void open() throws IOException { writer = CompressionFactory.getDoubleSerializer( segmentWriteOutMedium, StringUtils.format("%s.double_column", filenameBase), byteOrder, compression ); writer.open(); nullValueBitmapWriter = new ByteBufferWriter<>( segmentWriteOutMedium, bitmapSerdeFactory.getObjectStrategy() ); nullValueBitmapWriter.open(); nullRowsBitmap = bitmapSerdeFactory.getBitmapFactory().makeEmptyMutableBitmap(); }
@Override public void putMeta(ByteBuffer metaOut, CompressionStrategy strategy) { metaOut.put(CompressionFactory.setEncodingFlag(strategy.getId())); metaOut.put(CompressionFactory.LongEncodingFormat.TABLE.getId()); metaOut.put(CompressionFactory.TABLE_ENCODING_VERSION); metaOut.putInt(table.size()); for (int i = 0; i < valueAddedInOrder.size(); i++) { metaOut.putLong(valueAddedInOrder.getLong(i)); } }
public static byte clearEncodingFlag(byte strategyId) { return hasEncodingFlag(strategyId) ? (byte) (strategyId + FLAG_VALUE) : strategyId; }
public static Supplier<ColumnarDoubles> fromByteBuffer( ByteBuffer buffer, ByteOrder order ) { byte versionFromBuffer = buffer.get(); if (versionFromBuffer == LZF_VERSION || versionFromBuffer == VERSION) { final int totalSize = buffer.getInt(); final int sizePer = buffer.getInt(); CompressionStrategy compression = CompressionStrategy.LZF; if (versionFromBuffer == VERSION) { byte compressionId = buffer.get(); compression = CompressionStrategy.forId(compressionId); } return CompressionFactory.getDoubleSupplier( totalSize, sizePer, buffer.asReadOnlyBuffer(), order, compression ); } throw new IAE("Unknown version[%s]", versionFromBuffer); } }
compression = CompressionStrategy.forId(compressionId); Supplier<ColumnarFloats> supplier = CompressionFactory.getFloatSupplier( totalSize, sizePer,
File dataFile = new File(dir, entry.getKey()); ColumnarLongsSerializer writer = CompressionFactory.getLongSerializer( new OffHeapMemorySegmentWriteOutMedium(), "long",
File dataFile = new File(dir, entry.getKey()); ColumnarFloatsSerializer writer = CompressionFactory.getFloatSerializer( new OffHeapMemorySegmentWriteOutMedium(), "float",
if (versionFromBuffer == VERSION) { byte compressionId = buffer.get(); if (CompressionFactory.hasEncodingFlag(compressionId)) { encoding = CompressionFactory.LongEncodingFormat.forId(buffer.get()); compressionId = CompressionFactory.clearEncodingFlag(compressionId); Supplier<ColumnarLongs> supplier = CompressionFactory.getLongSupplier( totalSize, sizePer,
@Override public void open() throws IOException { writer = CompressionFactory.getDoubleSerializer( segmentWriteOutMedium, StringUtils.format("%s.double_column", filenameBase), byteOrder, compression ); writer.open(); }
@Override public void putMeta(ByteBuffer metaOut, CompressionStrategy strategy) { metaOut.put(CompressionFactory.setEncodingFlag(strategy.getId())); metaOut.put(CompressionFactory.LongEncodingFormat.DELTA.getId()); metaOut.put(CompressionFactory.DELTA_ENCODING_VERSION); metaOut.putLong(base); metaOut.putInt(bitsPerValue); }
public static byte setEncodingFlag(byte strategyId) { return hasEncodingFlag(strategyId) ? strategyId : (byte) (strategyId - FLAG_VALUE); }
@Override public void open() throws IOException { writer = CompressionFactory.getLongSerializer( segmentWriteOutMedium, StringUtils.format("%s.long_column", filenameBase), byteOrder, encoding, compression ); writer.open(); nullValueBitmapWriter = new ByteBufferWriter<>( segmentWriteOutMedium, bitmapSerdeFactory.getObjectStrategy() ); nullValueBitmapWriter.open(); nullRowsBitmap = bitmapSerdeFactory.getBitmapFactory().makeEmptyMutableBitmap(); }