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 BF3F29982 for ; Sat, 5 Nov 2011 02:18:13 +0000 (UTC) Received: (qmail 46232 invoked by uid 500); 5 Nov 2011 02:18:13 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 46202 invoked by uid 500); 5 Nov 2011 02:18:13 -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 46194 invoked by uid 99); 5 Nov 2011 02:18:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Nov 2011 02:18:13 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,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, 05 Nov 2011 02:18:11 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id CFDC0331F9D for ; Sat, 5 Nov 2011 02:17:51 +0000 (UTC) Date: Sat, 5 Nov 2011 02:17:51 +0000 (UTC) From: "Tsz Wo (Nicholas), SZE (Commented) (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <1823368149.2101.1320459471852.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <191507641.28687.1313084188083.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HDFS-2246) Shortcut a local client reads to a Datanodes files directly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-2246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13144522#comment-13144522 ] Tsz Wo (Nicholas), SZE commented on HDFS-2246: ---------------------------------------------- - For DataNode.getBlockLocalPathInfo(..), -* DataNode should check DFS_CLIENT_READ_SHORTCIRCUIT. -* Should it calls checkBlockToken? -* Should it checks whether the client address is local? - DataNode.getBlockLocalPathInfo(..) is not supposed to calls FSDataset.getMetaFile(..) directly. It should only calls FSDatasetInterface methods. How about change the new FSDatasetInterface.getBlockFile(..) to getBlockLocalPathInfo(..) wich returns BlockLocalPathInfo? - Change DataNode.userWithLocalPathAccess to final. - SoftLRUCache is implemented with SoftReference values. In general, it is a useful data structure. However, it may not be useful here since the size of the cache is about 10k and the size of value is small (< 1k). I suggest using a synchronized LinkedHashMap (no SoftReference) in BlockReaderLocal.cache and remove SoftLRUCache from the patch. - BlockReaderLocal.cache should not be initialized if checkShortCircuit is not enabled. I have not yet finished reading the client code. > Shortcut a local client reads to a Datanodes files directly > ----------------------------------------------------------- > > Key: HDFS-2246 > URL: https://issues.apache.org/jira/browse/HDFS-2246 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: Sanjay Radia > Attachments: 0001-HDFS-347.-Local-reads.patch, HDFS-2246-branch-0.20-security-205.patch, HDFS-2246-branch-0.20-security-205.patch, HDFS-2246-branch-0.20-security.patch, HDFS-2246.20s.1.patch, HDFS-2246.20s.2.txt, HDFS-2246.20s.3.txt, HDFS-2246.20s.4.txt, HDFS-2246.20s.patch, localReadShortcut20-security.2patch > > -- 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