Class BlockSource
java.lang.Object
org.aksw.commons.io.hadoop.binseach.v2.BlockSource
- All Implemented Interfaces:
HasArrayOps<byte[]>, ReadableChannelFactory<byte[]>, ReadableChannelSource<byte[]>, SeekableReadableChannelSource<byte[]>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.hadoop.io.compress.SplittableCompressionCodecprotected SeekableReadableChannelSource<byte[]> -
Constructor Summary
ConstructorsConstructorDescriptionBlockSource(SeekableReadableChannelSource<byte[]> delegate, org.apache.hadoop.io.compress.SplittableCompressionCodec codec) -
Method Summary
Modifier and TypeMethodDescriptionArrayOps<byte[]> SeekableReadableChannelSource<byte[]> newReadableChannel(long offset) newReadableChannel(long offset, boolean blockMode) block mode: return -2 when reaching a block boundary.newReadableChannel(long start, long end) newReadableChannel(long start, long end, boolean blockMode) static BlockSourcestatic BlockSourceof(SeekableReadableChannelSource<byte[]> delegate, org.apache.hadoop.io.compress.SplittableCompressionCodec codec) longsize()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SeekableReadableChannelSource
newReadableChannel
-
Field Details
-
delegate
-
codec
protected org.apache.hadoop.io.compress.SplittableCompressionCodec codec
-
-
Constructor Details
-
BlockSource
public BlockSource(SeekableReadableChannelSource<byte[]> delegate, org.apache.hadoop.io.compress.SplittableCompressionCodec codec)
-
-
Method Details
-
getDelegate
-
size
- Specified by:
sizein interfaceReadableChannelSource<byte[]>- Throws:
IOException
-
of
public static BlockSource of(Path path, org.apache.hadoop.io.compress.SplittableCompressionCodec codec) -
of
public static BlockSource of(SeekableReadableChannelSource<byte[]> delegate, org.apache.hadoop.io.compress.SplittableCompressionCodec codec) -
newReadableChannel
- Specified by:
newReadableChannelin interfaceReadableChannelFactory<byte[]>- Specified by:
newReadableChannelin interfaceReadableChannelSource<byte[]>- Specified by:
newReadableChannelin interfaceSeekableReadableChannelSource<byte[]>- Throws:
IOException
-
newReadableChannel
public BlockSourceChannel newReadableChannel(long start, long end, boolean blockMode) throws IOException - Throws:
IOException
-
getArrayOps
- Specified by:
getArrayOpsin interfaceHasArrayOps<byte[]>
-
newReadableChannel
- Specified by:
newReadableChannelin interfaceReadableChannelFactory<byte[]>- Specified by:
newReadableChannelin interfaceSeekableReadableChannelSource<byte[]>- Throws:
IOException
-
newReadableChannel
block mode: return -2 when reaching a block boundary.- Throws:
IOException
-
newReadableChannel
- Specified by:
newReadableChannelin interfaceReadableChannelFactory<byte[]>- Specified by:
newReadableChannelin interfaceSeekableReadableChannelSource<byte[]>- Throws:
IOException
-