本文整理了Java中org.apache.hadoop.hbase.regionserver.wal.WALCellCodec.getEncoder()
方法的一些代码示例,展示了WALCellCodec.getEncoder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WALCellCodec.getEncoder()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.regionserver.wal.WALCellCodec
类名称:WALCellCodec
方法名:getEncoder
暂无
代码示例来源:origin: apache/hbase
protected final void secureInitAfterHeader(boolean doCompress, Encryptor encryptor)
throws IOException {
if (conf.getBoolean(HConstants.ENABLE_WAL_ENCRYPTION, false) && encryptor != null) {
WALCellCodec codec = SecureWALCellCodec.getCodec(this.conf, encryptor);
this.cellEncoder = codec.getEncoder(getOutputStreamForCellEncoder());
// We do not support compression
this.compressionContext = null;
this.compressor = WALCellCodec.getNoneCompressor();
} else {
initAfterHeader0(doCompress);
}
}
代码示例来源:origin: apache/hbase
private void initAfterHeader0(boolean doCompress) throws IOException {
WALCellCodec codec = getCodec(conf, this.compressionContext);
this.cellEncoder = codec.getEncoder(getOutputStreamForCellEncoder());
if (doCompress) {
this.compressor = codec.getByteStringCompressor();
} else {
this.compressor = WALCellCodec.getNoneCompressor();
}
}
代码示例来源:origin: apache/hbase
compressTags));
ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);
Encoder encoder = codec.getEncoder(bos);
if (offheapKV) {
encoder.write(createOffheapKV(1));
代码示例来源:origin: apache/phoenix
@Override
public Encoder getEncoder(OutputStream os) {
// compression isn't on, do the default thing
if (this.compression == null) {
return new IndexKeyValueEncoder(os);
}
// compression is on, return our one that will handle putting in the correct markers
Encoder encoder = super.getEncoder(os);
return new CompressedIndexKeyValueEncoder(os, encoder);
}
代码示例来源:origin: apache/phoenix
private void writeWALEdit(WALCellCodec codec, List<Cell> kvs, FSDataOutputStream out) throws IOException {
out.writeInt(kvs.size());
Codec.Encoder cellEncoder = codec.getEncoder(out);
// We interleave the two lists for code simplicity
for (Cell kv : kvs) {
cellEncoder.write(kv);
}
}
代码示例来源:origin: harbby/presto-connectors
@Override
protected void initAfterHeader(boolean doCompress) throws IOException {
if (conf.getBoolean(HConstants.ENABLE_WAL_ENCRYPTION, false) && encryptor != null) {
WALCellCodec codec = SecureWALCellCodec.getCodec(this.conf, encryptor);
this.cellEncoder = codec.getEncoder(this.output);
// We do not support compression
this.compressionContext = null;
} else {
super.initAfterHeader(doCompress);
}
}
代码示例来源:origin: org.apache.phoenix/phoenix-core
@Override
public Encoder getEncoder(OutputStream os) {
// compression isn't on, do the default thing
if (this.compression == null) {
return new IndexKeyValueEncoder(os);
}
// compression is on, return our one that will handle putting in the correct markers
Encoder encoder = super.getEncoder(os);
return new CompressedIndexKeyValueEncoder(os, encoder);
}
代码示例来源:origin: com.aliyun.phoenix/ali-phoenix-core
@Override
public Encoder getEncoder(OutputStream os) {
// compression isn't on, do the default thing
if (this.compression == null) {
return new IndexKeyValueEncoder(os);
}
// compression is on, return our one that will handle putting in the correct markers
Encoder encoder = super.getEncoder(os);
return new CompressedIndexKeyValueEncoder(os, encoder);
}
代码示例来源:origin: harbby/presto-connectors
protected void initAfterHeader(boolean doCompress) throws IOException {
WALCellCodec codec = getCodec(conf, this.compressionContext);
this.cellEncoder = codec.getEncoder(this.output);
if (doCompress) {
this.compressor = codec.getByteStringCompressor();
}
}
代码示例来源:origin: org.apache.hbase/hbase-server
compressTags));
ByteArrayOutputStream bos = new ByteArrayOutputStream(1024);
Encoder encoder = codec.getEncoder(bos);
if (offheapKV) {
encoder.write(createOffheapKV(1));
内容来源于网络,如有侵权,请联系作者删除!