Source:
public static DFSLoggerInputStreams readHeaderAndReturnStream(FSDataInputStream input, AccumuloConfiguration conf) throws IOException { DataInputStream decryptingInput; 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(); byte[] magicBuffer = new byte[magic4.length]; try { input.readFully(magicBuffer); if (Arrays.equals(magicBuffer, magic4)) { byte[] params = CryptoUtils.readParams(input); CryptoService cryptoService = CryptoServiceFactory.newInstance(conf, ClassloaderType.ACCUMULO); CryptoEnvironment env = new CryptoEnvironmentImpl(Scope.WAL, params); FileDecrypter decrypter = cryptoService.getFileDecrypter(env); log.debug("Using for decrypting WAL", cryptoService.getClass().getSimpleName()); decryptingInput = cryptoService instanceof NoCryptoService ? input : new DataInputStream(decrypter.decryptStream(input)); } else if (Arrays.equals(magicBuffer, magic3)) { String cryptoModuleClassname = input.readUTF(); if (!cryptoModuleClassname.equals("NullCryptoModule")) { throw new IllegalArgumentException( "Old encryption modules not supported at this time. Unsupported module : " + cryptoModuleClassname); } decryptingInput = input; } else { throw new IllegalArgumentException( "Unsupported write ahead log version " + new String(magicBuffer)); } } catch (Exception e) { log.warn("Got EOFException trying to read WAL header information," + " assuming the rest of the file has no data."); throw new LogHeaderIncompleteException(e); } return new DFSLoggerInputStreams(input, decryptingInput); }

Target:
public static DFSLoggerInputStreams readHeaderAndReturnStream(FSDataInputStream input, AccumuloConfiguration conf) throws IOException { DataInputStream decryptingInput; 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 AssertionError("Always expect log file headers to be same length : " + magic4.length + " != " + magic3.length); byte[] magicBuffer = new byte[magic4.length]; try { input.readFully(magicBuffer); if (Arrays.equals(magicBuffer, magic4)) { byte[] params = CryptoUtils.readParams(input); CryptoService cryptoService = CryptoServiceFactory.newInstance(conf, ClassloaderType.ACCUMULO); CryptoEnvironment env = new CryptoEnvironmentImpl(Scope.WAL, params); FileDecrypter decrypter = cryptoService.getFileDecrypter(env); log.debug("Using for decrypting WAL", cryptoService.getClass().getSimpleName()); decryptingInput = cryptoService instanceof NoCryptoService ? input : new DataInputStream(decrypter.decryptStream(input)); } else if (Arrays.equals(magicBuffer, magic3)) { String cryptoModuleClassname = input.readUTF(); if (!cryptoModuleClassname.equals("NullCryptoModule")) { throw new IllegalArgumentException( "Old encryption modules not supported at this time. Unsupported module : " + cryptoModuleClassname); } decryptingInput = input; } else { throw new IllegalArgumentException( "Unsupported write ahead log version " + new String(magicBuffer)); } } catch (EOFException e) { throw new LogHeaderIncompleteException(e); } return new DFSLoggerInputStreams(input, decryptingInput); }