Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-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 C822E17EE5 for ; Thu, 7 May 2015 17:30:00 +0000 (UTC) Received: (qmail 29340 invoked by uid 500); 7 May 2015 17:30:00 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 29287 invoked by uid 500); 7 May 2015 17:30:00 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 29275 invoked by uid 99); 7 May 2015 17:30:00 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 May 2015 17:30:00 +0000 Date: Thu, 7 May 2015 17:30:00 +0000 (UTC) From: "Kannan Rajah (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HADOOP-11905) Abstraction for LocalDirAllocator MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-11905?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kannan Rajah updated HADOOP-11905: ---------------------------------- Status: Open (was: Patch Available) > Abstraction for LocalDirAllocator > --------------------------------- > > Key: HADOOP-11905 > URL: https://issues.apache.org/jira/browse/HADOOP-11905 > Project: Hadoop Common > Issue Type: Bug > Components: fs > Affects Versions: 2.5.2 > Reporter: Kannan Rajah > Assignee: Kannan Rajah > Labels: BB2015-05-TBR > Fix For: 2.7.1 > > Attachments: 0001-Abstraction-for-local-disk-path-allocation.patc= h > > > There are 2 abstractions used to write data to local disk. > LocalDirAllocator: Allocate paths from a set of configured local director= ies. > LocalFileSystem/RawLocalFileSystem: Read/write using java.io.* and java.n= io.* > In the current implementation, local disk is managed by guest OS and not = HDFS. The proposal is to provide a new abstraction that encapsulates the ab= ove 2 abstractions and hides who manages the local disks. This enables us t= o provide an alternate implementation where a DFS can manage the local disk= s and it can be accessed using HDFS APIs. This means the DFS maintains a na= mespace for node local directories and can create paths that are guaranteed= to be present on a specific node. > Here is an example use case for Shuffle: When a mapper writes intermediat= e data using this new implementation, it will continue write to local disk.= When a reducer needs to access data from a remote node, it can use HDFS AP= Is with a path that points to that node=E2=80=99s local namespace instead o= f having to use HTTP server to transfer the data across nodes. > New Abstractions > 1. LocalDiskPathAllocator > Interface to get file/directory paths from the local disk namespace. > This contains all the APIs that are currently supported by LocalDirAlloca= tor. So we just need to change LocalDirAllocator to implement this new inte= rface. > 2. LocalDiskUtil > Helper class to get a handle to LocalDiskPathAllocator and the FileSystem > that is used to manage those paths. > By default, it will return LocalDirAllocator and LocalFileSystem. > A supporting DFS can return DFSLocalDirAllocator and an instance of DFS. > 3. DFSLocalDirAllocator > This is a generic implementation. An allocator is created for a specific = node. It uses Configuration object to get user configured base directory an= d appends the node hostname to it. Hence the returned paths are within the = node local namespace. -- This message was sent by Atlassian JIRA (v6.3.4#6332)