You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2014/01/29 19:55:40 UTC
svn commit: r1562545 -
/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SecureProtobufLogReader.java
Author: apurtell
Date: Wed Jan 29 18:55:40 2014
New Revision: 1562545
URL: http://svn.apache.org/r1562545
Log:
HBASE-10433 SecureProtobufWALReader does not handle unencrypted WALs if configured to encrypt (Anoop Sam John)
Modified:
hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SecureProtobufLogReader.java
Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SecureProtobufLogReader.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SecureProtobufLogReader.java?rev=1562545&r1=1562544&r2=1562545&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SecureProtobufLogReader.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SecureProtobufLogReader.java Wed Jan 29 18:55:40 2014
@@ -114,11 +114,15 @@ public class SecureProtobufLogReader ext
@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();
+ }
}
}