public BlockCompressedRecordFile(final Supplier<? extends Either<IOException, ? extends RandomAccessDataInput>> inputSupplier, final Closeable closeable, String file, Serializer<E> serializer, CompressionCodec codec, BlockingQueue<Decompressor> decompressorPool, int blockSize, int recordIndexBits, int padBits, int maxChunkSize) throws IOException { this.inputSupplier = inputSupplier; this.file = file; this.serializer = serializer; this.codec = codec; this.blockSize = blockSize; this.padBits = padBits; this.maxChunkSize = maxChunkSize; pad = 1<<padBits; padMask = ~(long)(pad-1); shift = Math.max(recordIndexBits - padBits, 0); mask = (1L<<recordIndexBits)-1; closeableRef = SharedReference.create(closeable); try { blockCache = new BlockCache(decompressorPool); } catch (Throwable t) { Closeables2.closeQuietly(closeableRef, log); Throwables.propagateIfInstanceOf(t, IOException.class); throw Throwables.propagate(t); } }
public BlockCompressedRecordFile(final Supplier<? extends Either<IOException, ? extends RandomAccessDataInput>> inputSupplier, final Closeable closeable, String file, Serializer<E> serializer, CompressionCodec codec, BlockingQueue<Decompressor> decompressorPool, int blockSize, int recordIndexBits, int padBits, int maxChunkSize) throws IOException { this.inputSupplier = inputSupplier; this.file = file; this.serializer = serializer; this.codec = codec; this.blockSize = blockSize; this.padBits = padBits; this.maxChunkSize = maxChunkSize; pad = 1<<padBits; padMask = ~(long)(pad-1); shift = Math.max(recordIndexBits - padBits, 0); mask = (1L<<recordIndexBits)-1; closeableRef = SharedReference.create(closeable); try { blockCache = new BlockCache(decompressorPool); } catch (Throwable t) { Closeables2.closeQuietly(closeableRef, log); Throwables.propagateIfInstanceOf(t, IOException.class); throw Throwables.propagate(t); } }