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 2018/12/14 14:01:14 UTC

[GitHub] keith-turner commented on a change in pull request #829: Stop creating double OuputStreams for WAL

keith-turner commented on a change in pull request #829: Stop creating double OuputStreams for WAL
URL: https://github.com/apache/accumulo/pull/829#discussion_r241763130
 
 

 ##########
 File path: server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
 ##########
 @@ -443,8 +444,13 @@ public synchronized void open(String address) throws IOException {
       byte[] cryptoParams = encrypter.getDecryptionParameters();
       CryptoUtils.writeParams(cryptoParams, logFile);
 
-      encryptingLogFile = new DataOutputStream(
-          encrypter.encryptStream(new NoFlushOutputStream(logFile)));
+      // write directly to logFile if no crypto detected
+      if (encrypter instanceof NoFileEncrypter) {
+        encryptingLogFile = logFile;
+      } else {
+        encryptingLogFile = (NoFlushOutputStream) encrypter
 
 Review comment:
   Does the pluggable crypto service have to return a `NoFlushOutputStream`?  Or does Accumulo code wrapping the crypto service create the `NoFlushOutputStream`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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