HBASE-10433 SecureProtobufWALReader does not handle unencrypted WALs if configured to encrypt (Anoop Sam John)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1562545 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3b21be1303
commit
b75d3a54c1
|
@ -114,11 +114,15 @@ public class SecureProtobufLogReader extends ProtobufLogReader {
|
|||
|
||||
@Override
|
||||
protected void initAfterCompression() throws IOException {
|
||||
WALCellCodec codec = SecureWALCellCodec.getCodec(this.conf, decryptor);
|
||||
this.cellDecoder = codec.getDecoder(this.inputStream);
|
||||
// We do not support compression
|
||||
this.compressionContext = null;
|
||||
this.hasCompression = false;
|
||||
if (decryptor != null) {
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue