@InterfaceAudience.Private public class IPCUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
IPCUtil.CellScannerButNoCodecException
Thrown if a cellscanner but no codec to encode it with.
|
| Modifier and Type | Field and Description |
|---|---|
static org.apache.commons.logging.Log |
LOG |
| Constructor and Description |
|---|
IPCUtil(org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
ByteBuffer |
buildCellBlock(Codec codec,
org.apache.hadoop.io.compress.CompressionCodec compressor,
CellScanner cellScanner)
Puts CellScanner Cells into a cell block using passed in
codec and/or
compressor. |
CellScanner |
createCellScanner(Codec codec,
org.apache.hadoop.io.compress.CompressionCodec compressor,
byte[] cellBlock) |
CellScanner |
createCellScanner(Codec codec,
org.apache.hadoop.io.compress.CompressionCodec compressor,
byte[] cellBlock,
int offset,
int length) |
static ByteBuffer |
getDelimitedMessageAsByteBuffer(Message m) |
static int |
getTotalSizeWhenWrittenDelimited(Message... messages) |
static void |
readChunked(DataInput in,
byte[] dest,
int offset,
int len)
Read in chunks of 8K (HBASE-7239)
|
static int |
write(OutputStream dos,
Message header,
Message param,
ByteBuffer cellBlock)
Write out header, param, and cell block if there is one.
|
public ByteBuffer buildCellBlock(Codec codec, org.apache.hadoop.io.compress.CompressionCodec compressor, CellScanner cellScanner) throws IOException
codec and/or
compressor.codec - compressor - cellScanner - codec and/or compressor; the returned buffer has been
flipped and is ready for reading. Use limit to find total size.IOExceptionpublic CellScanner createCellScanner(Codec codec, org.apache.hadoop.io.compress.CompressionCodec compressor, byte[] cellBlock) throws IOException
codec - cellBlock - cellBlockIOExceptionpublic CellScanner createCellScanner(Codec codec, org.apache.hadoop.io.compress.CompressionCodec compressor, byte[] cellBlock, int offset, int length) throws IOException
codec - cellBlock - offset - length - cellBlockIOExceptionpublic static ByteBuffer getDelimitedMessageAsByteBuffer(Message m) throws IOException
m - Message to serialize delimited; i.e. w/ a vint of its size preceeding its
serialization.m is nullIOExceptionpublic static int write(OutputStream dos, Message header, Message param, ByteBuffer cellBlock) throws IOException
dos - header - param - cellBlock - IOExceptionpublic static void readChunked(DataInput in, byte[] dest, int offset, int len) throws IOException
in - dest - offset - len - IOExceptionpublic static int getTotalSizeWhenWrittenDelimited(Message... messages)
Copyright © 2015 The Apache Software Foundation. All Rights Reserved.