@InterfaceAudience.Private public class IPCUtil extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
IPCUtil.CellScannerButNoCodecException
Thrown if a cellscanner but no codec to encode it with.
|
| 限定符和类型 | 字段和说明 |
|---|---|
static org.apache.commons.logging.Log |
LOG |
| 构造器和说明 |
|---|
IPCUtil(org.apache.hadoop.conf.Configuration conf) |
| 限定符和类型 | 方法和说明 |
|---|---|
ByteBuffer |
buildCellBlock(org.apache.hadoop.hbase.codec.Codec codec,
org.apache.hadoop.io.compress.CompressionCodec compressor,
org.apache.hadoop.hbase.CellScanner cellScanner)
Puts CellScanner Cells into a cell block using passed in
codec and/or
compressor. |
org.apache.hadoop.hbase.CellScanner |
createCellScanner(org.apache.hadoop.hbase.codec.Codec codec,
org.apache.hadoop.io.compress.CompressionCodec compressor,
byte[] cellBlock) |
org.apache.hadoop.hbase.CellScanner |
createCellScanner(org.apache.hadoop.hbase.codec.Codec codec,
org.apache.hadoop.io.compress.CompressionCodec compressor,
byte[] cellBlock,
int offset,
int length) |
static ByteBuffer |
getDelimitedMessageAsByteBuffer(com.google.protobuf.Message m) |
static int |
getTotalSizeWhenWrittenDelimited(com.google.protobuf.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,
com.google.protobuf.Message header,
com.google.protobuf.Message param,
ByteBuffer cellBlock)
Write out header, param, and cell block if there is one.
|
public ByteBuffer buildCellBlock(org.apache.hadoop.hbase.codec.Codec codec, org.apache.hadoop.io.compress.CompressionCodec compressor, org.apache.hadoop.hbase.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 org.apache.hadoop.hbase.CellScanner createCellScanner(org.apache.hadoop.hbase.codec.Codec codec,
org.apache.hadoop.io.compress.CompressionCodec compressor,
byte[] cellBlock)
throws IOException
codec - cellBlock - cellBlockIOExceptionpublic org.apache.hadoop.hbase.CellScanner createCellScanner(org.apache.hadoop.hbase.codec.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(com.google.protobuf.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, com.google.protobuf.Message header, com.google.protobuf.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(com.google.protobuf.Message... messages)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.