本文整理了Java中org.apache.hadoop.hbase.regionserver.wal.WALCellCodec.getDecoder()
方法的一些代码示例,展示了WALCellCodec.getDecoder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WALCellCodec.getDecoder()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.regionserver.wal.WALCellCodec
类名称:WALCellCodec
方法名:getDecoder
暂无
代码示例来源:origin: apache/hbase
@Override
public Decoder getDecoder(ByteBuff buf) {
return getDecoder(new ByteBuffInputStream(buf));
}
代码示例来源:origin: apache/hbase
@Override
protected void initAfterCompression(String cellCodecClsName) throws IOException {
if (decryptor != null && cellCodecClsName.equals(SecureWALCellCodec.class.getName())) {
WALCellCodec codec = SecureWALCellCodec.getCodec(this.conf, decryptor);
this.cellDecoder = codec.getDecoder(this.inputStream);
// We do not support compression with WAL encryption
this.compressionContext = null;
this.byteStringUncompressor = WALCellCodec.getNoneUncompressor();
this.hasCompression = false;
} else {
super.initAfterCompression(cellCodecClsName);
}
}
代码示例来源:origin: apache/hbase
@Override
protected void initAfterCompression(String cellCodecClsName) throws IOException {
WALCellCodec codec = getCodec(this.conf, cellCodecClsName, this.compressionContext);
this.cellDecoder = codec.getDecoder(this.inputStream);
if (this.hasCompression) {
this.byteStringUncompressor = codec.getByteStringUncompressor();
} else {
this.byteStringUncompressor = WALCellCodec.getNoneUncompressor();
}
}
代码示例来源:origin: apache/hbase
Decoder decoder = codec.getDecoder(is);
decoder.advance();
KeyValue kv = (KeyValue) decoder.current();
代码示例来源:origin: apache/phoenix
@Override
public Decoder getDecoder(InputStream is) {
// compression isn't enabled
if (this.compression == null) {
return useDefaultDecoder ? new IndexKeyValueDecoder(is) : new BinaryCompatibleIndexKeyValueDecoder(is);
}
// there is compression, so we get the standard decoder to handle reading those kvs
Decoder decoder = super.getDecoder(is);
// compression is on, reqturn our custom decoder
return useDefaultDecoder ? new CompressedIndexKeyValueDecoder(is, decoder) : new BinaryCompatibleCompressedIndexKeyValueDecoder(is, decoder);
}
代码示例来源:origin: apache/phoenix
WALEdit edit = new WALEdit();
int numEdits = in.readInt();
edit.readFromCells(codec.getDecoder(in), numEdits);
read.add(edit);
代码示例来源:origin: harbby/presto-connectors
@Override
protected void initAfterCompression(String cellCodecClsName) throws IOException {
if (decryptor != null && cellCodecClsName.equals(SecureWALCellCodec.class.getName())) {
WALCellCodec codec = SecureWALCellCodec.getCodec(this.conf, decryptor);
this.cellDecoder = codec.getDecoder(this.inputStream);
// We do not support compression with WAL encryption
this.compressionContext = null;
this.hasCompression = false;
} else {
super.initAfterCompression(cellCodecClsName);
}
}
代码示例来源:origin: harbby/presto-connectors
@Override
protected void initAfterCompression(String cellCodecClsName) throws IOException {
WALCellCodec codec = getCodec(this.conf, cellCodecClsName, this.compressionContext);
this.cellDecoder = codec.getDecoder(this.inputStream);
if (this.hasCompression) {
this.byteStringUncompressor = codec.getByteStringUncompressor();
}
}
代码示例来源:origin: org.apache.phoenix/phoenix-core
@Override
public Decoder getDecoder(InputStream is) {
// compression isn't enabled
if (this.compression == null) {
return useDefaultDecoder ? new IndexKeyValueDecoder(is) : new BinaryCompatibleIndexKeyValueDecoder(is);
}
// there is compression, so we get the standard decoder to handle reading those kvs
Decoder decoder = super.getDecoder(is);
// compression is on, reqturn our custom decoder
return useDefaultDecoder ? new CompressedIndexKeyValueDecoder(is, decoder) : new BinaryCompatibleCompressedIndexKeyValueDecoder(is, decoder);
}
代码示例来源:origin: com.aliyun.phoenix/ali-phoenix-core
@Override
public Decoder getDecoder(InputStream is) {
// compression isn't enabled
if (this.compression == null) {
return useDefaultDecoder ? new IndexKeyValueDecoder(is) : new BinaryCompatibleIndexKeyValueDecoder(is);
}
// there is compression, so we get the standard decoder to handle reading those kvs
Decoder decoder = super.getDecoder(is);
// compression is on, reqturn our custom decoder
return useDefaultDecoder ? new CompressedIndexKeyValueDecoder(is, decoder) : new BinaryCompatibleCompressedIndexKeyValueDecoder(is, decoder);
}
代码示例来源:origin: org.apache.hbase/hbase-server
Decoder decoder = codec.getDecoder(is);
decoder.advance();
KeyValue kv = (KeyValue) decoder.current();
内容来源于网络,如有侵权,请联系作者删除!