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 518F09745 for ; Tue, 3 Apr 2012 23:24:45 +0000 (UTC) Received: (qmail 62542 invoked by uid 500); 3 Apr 2012 23:24:45 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 62494 invoked by uid 500); 3 Apr 2012 23:24:45 -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 62485 invoked by uid 99); 3 Apr 2012 23:24:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2012 23:24:45 +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; Tue, 03 Apr 2012 23:24:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id DD762356A74 for ; Tue, 3 Apr 2012 23:24:23 +0000 (UTC) Date: Tue, 3 Apr 2012 23:24:23 +0000 (UTC) From: "Todd Lipcon (Commented) (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <259020312.9530.1333495463908.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <855118746.26047.1331925940549.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HDFS-3110) libhdfs implementation of direct read API 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-3110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13245878#comment-13245878 ] Todd Lipcon commented on HDFS-3110: ----------------------------------- Sorry, a few things I missed when I looked at the earlier rev: - we no longer need to expose the hdfsReadDirect API in hdfs.h, given it's automatically handled. Instead we should probably rename to {{readDirect}} and make it static in hdfs.c. If you need it for the test case, then I think we should just add it as an extern declaration in the test, and leave it non-static -- but not advertise it in hdfs.h. We don't want users to think they have to use it explicitly. ---- {code} + // Bit fields for hdfsFile_internal flags {code} nit: extra space ---- Looks like handleReadResult returns -1 when the underlying code calls an exception. Then we have the following code: {code} + if (noReadBytes != 0) { + (*env)->GetByteArrayRegion(env, jbRarray, 0, noReadBytes, buffer); } {code} won't that end up calling {{GetByteArrayRegion}} with a negative length? Seems suspicious. > libhdfs implementation of direct read API > ----------------------------------------- > > Key: HDFS-3110 > URL: https://issues.apache.org/jira/browse/HDFS-3110 > Project: Hadoop HDFS > Issue Type: Improvement > Components: libhdfs > Reporter: Henry Robinson > Assignee: Henry Robinson > Fix For: 0.24.0 > > Attachments: HDFS-3110.0.patch, HDFS-3110.1.patch, HDFS-3110.2.patch, HDFS-3110.3.patch > > > Once HDFS-2834 gets committed, we can add support for the new API to libhdfs, which leads to significant performance increases when reading local data from C. -- 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