You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/04/23 22:31:55 UTC

[GitHub] [accumulo] ctubbsii commented on a change in pull request #1127: fixes #1111 support reading unencrypted WALs from 1.9

ctubbsii commented on a change in pull request #1127: fixes #1111 support reading unencrypted WALs from 1.9
URL: https://github.com/apache/accumulo/pull/1127#discussion_r277895388
 
 

 ##########
 File path: server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
 ##########
 @@ -361,11 +361,16 @@ public static DFSLoggerInputStreams readHeaderAndReturnStream(FSDataInputStream
       AccumuloConfiguration conf) throws IOException {
     DataInputStream decryptingInput;
 
-    byte[] magic = DfsLogger.LOG_FILE_HEADER_V4.getBytes(UTF_8);
-    byte[] magicBuffer = new byte[magic.length];
+    byte[] magic4 = DfsLogger.LOG_FILE_HEADER_V4.getBytes(UTF_8);
+    byte[] magic3 = DfsLogger.LOG_FILE_HEADER_V3.getBytes(UTF_8);
+
+    if (magic4.length != magic3.length)
+      throw new IllegalStateException();
 
 Review comment:
   This could use a message. Could also use AssertionError here, since it's being used that way.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services