Class HadoopCompressor<T extends io.airlift.compress.Compressor>
java.lang.Object
org.apache.hadoop.hbase.io.compress.aircompressor.HadoopCompressor<T>
- All Implemented Interfaces:
CanReinit
,org.apache.hadoop.io.compress.Compressor
- Direct Known Subclasses:
Lz4Codec.HadoopLz4Compressor
,LzoCodec.HadoopLzoCompressor
,SnappyCodec.HadoopSnappyCompressor
,ZstdCodec.HadoopZstdCompressor
@Private
public abstract class HadoopCompressor<T extends io.airlift.compress.Compressor>
extends Object
implements CanReinit, org.apache.hadoop.io.compress.Compressor
Hadoop compressor glue for aircompressor compressors.
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
protected long
protected long
protected T
protected boolean
protected boolean
protected ByteBuffer
protected ByteBuffer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compress
(byte[] b, int off, int len) void
end()
void
finish()
boolean
finished()
(package private) abstract int
getBufferSize
(org.apache.hadoop.conf.Configuration conf) long
long
(package private) abstract int
getLevel
(org.apache.hadoop.conf.Configuration conf) (package private) int
maxCompressedLength
(int len) boolean
void
reinit
(org.apache.hadoop.conf.Configuration conf) void
reset()
void
setDictionary
(byte[] b, int off, int len) void
setInput
(byte[] b, int off, int len)
-
Field Details
-
compressor
-
inBuf
-
outBuf
-
bufferSize
-
finish
-
finished
-
bytesRead
-
bytesWritten
-
-
Constructor Details
-
HadoopCompressor
HadoopCompressor(T compressor, int bufferSize)
-
-
Method Details
-
compress
- Specified by:
compress
in interfaceorg.apache.hadoop.io.compress.Compressor
- Throws:
IOException
-
end
- Specified by:
end
in interfaceorg.apache.hadoop.io.compress.Compressor
-
finish
- Specified by:
finish
in interfaceorg.apache.hadoop.io.compress.Compressor
-
finished
- Specified by:
finished
in interfaceorg.apache.hadoop.io.compress.Compressor
-
getBytesRead
- Specified by:
getBytesRead
in interfaceorg.apache.hadoop.io.compress.Compressor
-
getBytesWritten
- Specified by:
getBytesWritten
in interfaceorg.apache.hadoop.io.compress.Compressor
-
needsInput
- Specified by:
needsInput
in interfaceorg.apache.hadoop.io.compress.Compressor
-
reinit
-
reset
- Specified by:
reset
in interfaceorg.apache.hadoop.io.compress.Compressor
-
setDictionary
- Specified by:
setDictionary
in interfaceorg.apache.hadoop.io.compress.Compressor
-
setInput
- Specified by:
setInput
in interfaceorg.apache.hadoop.io.compress.Compressor
-
maxCompressedLength
-
getLevel
-
getBufferSize
-