hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r1562546 - /hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SecureProtobufLogReader.java
Date Wed, 29 Jan 2014 18:57:08 GMT
Author: apurtell
Date: Wed Jan 29 18:57:07 2014
New Revision: 1562546

URL: http://svn.apache.org/r1562546
Log:
HBASE-10433 SecureProtobufWALReader does not handle unencrypted WALs if configured to encrypt
(Anoop Sam John)

Modified:
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SecureProtobufLogReader.java

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SecureProtobufLogReader.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SecureProtobufLogReader.java?rev=1562546&r1=1562545&r2=1562546&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SecureProtobufLogReader.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/SecureProtobufLogReader.java
Wed Jan 29 18:57:07 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();
+    }
   }
 
 }



Mime
View raw message