@InterfaceAudience.Private public abstract class HadoopCompressor<T extends io.airlift.compress.Compressor> extends Object implements CanReinit, org.apache.hadoop.io.compress.Compressor
Modifier and Type | Field and Description |
---|---|
protected int |
bufferSize |
protected long |
bytesRead |
protected long |
bytesWritten |
protected T |
compressor |
protected boolean |
finish |
protected boolean |
finished |
protected ByteBuffer |
inBuf |
protected ByteBuffer |
outBuf |
Constructor and Description |
---|
HadoopCompressor(T compressor,
int bufferSize) |
Modifier and Type | Method and Description |
---|---|
int |
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 |
getBytesRead() |
long |
getBytesWritten() |
(package private) abstract int |
getLevel(org.apache.hadoop.conf.Configuration conf) |
(package private) int |
maxCompressedLength(int len) |
boolean |
needsInput() |
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) |
protected T extends io.airlift.compress.Compressor compressor
protected ByteBuffer inBuf
protected ByteBuffer outBuf
protected int bufferSize
protected boolean finish
protected boolean finished
protected long bytesRead
protected long bytesWritten
HadoopCompressor(T compressor, int bufferSize)
public int compress(byte[] b, int off, int len) throws IOException
compress
in interface org.apache.hadoop.io.compress.Compressor
IOException
public void end()
end
in interface org.apache.hadoop.io.compress.Compressor
public void finish()
finish
in interface org.apache.hadoop.io.compress.Compressor
public boolean finished()
finished
in interface org.apache.hadoop.io.compress.Compressor
public long getBytesRead()
getBytesRead
in interface org.apache.hadoop.io.compress.Compressor
public long getBytesWritten()
getBytesWritten
in interface org.apache.hadoop.io.compress.Compressor
public boolean needsInput()
needsInput
in interface org.apache.hadoop.io.compress.Compressor
public void reinit(org.apache.hadoop.conf.Configuration conf)
public void reset()
reset
in interface org.apache.hadoop.io.compress.Compressor
public void setDictionary(byte[] b, int off, int len)
setDictionary
in interface org.apache.hadoop.io.compress.Compressor
public void setInput(byte[] b, int off, int len)
setInput
in interface org.apache.hadoop.io.compress.Compressor
int maxCompressedLength(int len)
abstract int getLevel(org.apache.hadoop.conf.Configuration conf)
abstract int getBufferSize(org.apache.hadoop.conf.Configuration conf)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.