CAMEL-7900 Honored chunksize in camel-hdfs2
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/246014f2 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/246014f2 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/246014f2 Branch: refs/remotes/origin/camel-2.13.x Commit: 246014f27e77205541416b911a8fdb2c9756efee Parents: 607ab4e Author: Willem Jiang <willem.ji...@gmail.com> Authored: Fri Oct 10 21:58:11 2014 +0800 Committer: Willem Jiang <willem.ji...@gmail.com> Committed: Sat Oct 11 13:57:33 2014 +0800 ---------------------------------------------------------------------- .../main/java/org/apache/camel/component/hdfs2/HdfsFileType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/246014f2/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsFileType.java ---------------------------------------------------------------------- diff --git a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsFileType.java b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsFileType.java index bb08440..bc97355 100644 --- a/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsFileType.java +++ b/components/camel-hdfs2/src/main/java/org/apache/camel/component/hdfs2/HdfsFileType.java @@ -76,7 +76,7 @@ public enum HdfsFileType { public long next(HdfsInputStream hdfsistr, Holder<Object> key, Holder<Object> value) { try { ByteArrayOutputStream bos = new ByteArrayOutputStream(hdfsistr.getChunkSize()); - byte buf[] = new byte[HdfsConstants.DEFAULT_BUFFERSIZE]; + byte buf[] = new byte[hdfsistr.getChunkSize()]; int bytesRead = ((InputStream) hdfsistr.getIn()).read(buf); if (bytesRead >= 0) { bos.write(buf, 0, bytesRead);