diff --git a/core/src/main/java/org/apache/druid/java/util/common/FileUtils.java b/core/src/main/java/org/apache/druid/java/util/common/FileUtils.java index 17f0ed01c33..6025ad6cf73 100644 --- a/core/src/main/java/org/apache/druid/java/util/common/FileUtils.java +++ b/core/src/main/java/org/apache/druid/java/util/common/FileUtils.java @@ -242,6 +242,14 @@ public class FileUtils { return new FilterOutputStream(out) { + // Default implementation of this method in FilterOutputStream converts single write operation to + // multiple write operations of 1 byte each, which is terribly inefficient. + @Override + public void write(byte b[], int off, int len) throws IOException + { + out.write(b, off, len); + } + @Override public void close() {