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:
[email protected]
With regards,
Apache Git Services