accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [2/3] git commit: ACCUMULO-2668 Override the write method which takes a byte[] to call the efficient method on the wrapped OutputStream
Date Tue, 15 Apr 2014 04:40:53 GMT
ACCUMULO-2668 Override the write method which takes a byte[] to call the efficient method on
the wrapped OutputStream

FilterOutputStream's implementation for this write method is horribly inefficient,
and causes a massive degradation in ingest performance.

Signed-off-by: Josh Elser <elserj@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e4cef7f2
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e4cef7f2
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e4cef7f2

Branch: refs/heads/master
Commit: e4cef7f209551ebe17e43058e182ca22f8f89293
Parents: 126b648
Author: Jonathan Park <parkjsung@gmail.com>
Authored: Tue Apr 15 00:37:21 2014 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Tue Apr 15 00:40:10 2014 -0400

----------------------------------------------------------------------
 .../accumulo/core/security/crypto/NoFlushOutputStream.java     | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/e4cef7f2/core/src/main/java/org/apache/accumulo/core/security/crypto/NoFlushOutputStream.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/security/crypto/NoFlushOutputStream.java
b/core/src/main/java/org/apache/accumulo/core/security/crypto/NoFlushOutputStream.java
index a68bdfd..2f9f4bb 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/crypto/NoFlushOutputStream.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/crypto/NoFlushOutputStream.java
@@ -17,6 +17,7 @@
 package org.apache.accumulo.core.security.crypto;
 
 import java.io.FilterOutputStream;
+import java.io.IOException;
 import java.io.OutputStream;
 
 public class NoFlushOutputStream extends FilterOutputStream {
@@ -26,6 +27,11 @@ public class NoFlushOutputStream extends FilterOutputStream {
   }
 
   @Override
+  public void write(byte[] b, int off, int len) throws IOException {
+    out.write(b, off, len);
+  }
+
+  @Override
   public void flush() {}
 
 }


Mime
View raw message