Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ED7BD172B1 for ; Sat, 11 Oct 2014 05:58:13 +0000 (UTC) Received: (qmail 78804 invoked by uid 500); 11 Oct 2014 05:58:13 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 78653 invoked by uid 500); 11 Oct 2014 05:58:13 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 78629 invoked by uid 99); 11 Oct 2014 05:58:13 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Oct 2014 05:58:13 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 9228B81EC1E; Sat, 11 Oct 2014 05:58:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ningjiang@apache.org To: commits@camel.apache.org Date: Sat, 11 Oct 2014 05:58:14 -0000 Message-Id: <2c68a56a2cea47f6bf36dd58f998205c@git.apache.org> In-Reply-To: <47fd2bed5d2f47ed832360d0ca261f4e@git.apache.org> References: <47fd2bed5d2f47ed832360d0ca261f4e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/6] git commit: CAMEL-7900 Honored chunksize in camel-hdfs CAMEL-7900 Honored chunksize in camel-hdfs Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/fae7008d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/fae7008d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/fae7008d Branch: refs/heads/camel-2.14.x Commit: fae7008d2f93575cde20461539d215970c89025c Parents: 230c0dd Author: Willem Jiang Authored: Fri Oct 10 21:58:47 2014 +0800 Committer: Willem Jiang Committed: Sat Oct 11 13:56:35 2014 +0800 ---------------------------------------------------------------------- .../main/java/org/apache/camel/component/hdfs/HdfsFileType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/fae7008d/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsFileType.java ---------------------------------------------------------------------- diff --git a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsFileType.java b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsFileType.java index a3b2112..97c174f 100644 --- a/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsFileType.java +++ b/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsFileType.java @@ -75,7 +75,7 @@ public enum HdfsFileType { public long next(HdfsInputStream hdfsistr, Holder key, Holder 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);