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 <els...@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 <parkjs...@gmail.com> Authored: Tue Apr 15 00:37:21 2014 -0400 Committer: Josh Elser <els...@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() {} }