Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AEDC39168 for ; Sat, 3 Mar 2012 01:27:37 +0000 (UTC) Received: (qmail 34068 invoked by uid 500); 3 Mar 2012 01:27:37 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 34039 invoked by uid 500); 3 Mar 2012 01:27:37 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 34031 invoked by uid 99); 3 Mar 2012 01:27:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Mar 2012 01:27:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Mar 2012 01:27:36 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 42804514F for ; Sat, 3 Mar 2012 01:27:06 +0000 (UTC) Date: Sat, 3 Mar 2012 01:27:06 +0000 (UTC) From: "Henry Robinson (Updated) (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <252093746.16475.1330738026273.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1534674482.73293.1327433800878.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (HDFS-2834) ByteBuffer-based read API for DFSInputStream MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HDFS-2834?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henry Robinson updated HDFS-2834: --------------------------------- Attachment: HDFS-2834.3.patch Here's a patch rebased after the HA merge. > ByteBuffer-based read API for DFSInputStream > -------------------------------------------- > > Key: HDFS-2834 > URL: https://issues.apache.org/jira/browse/HDFS-2834 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: Henry Robinson > Assignee: Henry Robinson > Attachments: HDFS-2834-no-common.patch, HDFS-2834.3.patch, HDFS-2834.patch, HDFS-2834.patch > > > The {{DFSInputStream}} read-path always copies bytes into a JVM-allocated {{byte[]}}. Although for many clients this is desired behaviour, in certain situations, such as native-reads through libhdfs, this imposes an extra copy penalty since the {{byte[]}} needs to be copied out again into a natively readable memory area. > For these cases, it would be preferable to allow the client to supply its own buffer, wrapped in a {{ByteBuffer}}, to avoid that final copy overhead. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira