hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-4095) Avoid sharing AllocatorPerContext object in LocalDirAllocator between ShuffleHandler and LocalDirsHandlerService.
Date Wed, 23 Sep 2015 18:20:05 GMT

    [ https://issues.apache.org/jira/browse/YARN-4095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14904969#comment-14904969
] 

Hudson commented on YARN-4095:
------------------------------

SUCCESS: Integrated in Hadoop-Yarn-trunk-Java8 #435 (See [https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/435/])
YARN-4095. Avoid sharing AllocatorPerContext object in LocalDirAllocator between ShuffleHandler
and LocalDirsHandlerService. Contributed by Zhihai Xu (jlowe: rev c890c51a916894a985439497b8a44e8eee82d762)
* hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/LocalDirsHandlerService.java
* hadoop-yarn-project/CHANGES.txt
* hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestLocalDirsHandlerService.java


> Avoid sharing AllocatorPerContext object in LocalDirAllocator between ShuffleHandler
and LocalDirsHandlerService.
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-4095
>                 URL: https://issues.apache.org/jira/browse/YARN-4095
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: nodemanager
>            Reporter: zhihai xu
>            Assignee: zhihai xu
>             Fix For: 2.8.0
>
>         Attachments: YARN-4095.000.patch, YARN-4095.001.patch
>
>
> Currently {{ShuffleHandler}} and {{LocalDirsHandlerService}} share {{AllocatorPerContext}}
object in {{LocalDirAllocator}} for configuration {{NM_LOCAL_DIRS}} because {{AllocatorPerContext}}
are stored in a static TreeMap with configuration name as key
> {code}
>   private static Map <String, AllocatorPerContext> contexts = 
>                  new TreeMap<String, AllocatorPerContext>();
> {code}
> {{LocalDirsHandlerService}} and {{ShuffleHandler}} both create a {{LocalDirAllocator}}
using {{NM_LOCAL_DIRS}}. Even they don't use the same {{Configuration}} object, but they will
use the same {{AllocatorPerContext}} object. Also {{LocalDirsHandlerService}} may change {{NM_LOCAL_DIRS}}
value in its {{Configuration}} object to exclude full and bad local dirs, {{ShuffleHandler}}
always uses the original {{NM_LOCAL_DIRS}} value in its {{Configuration}} object. So every
time {{AllocatorPerContext#confChanged}} is called by {{ShuffleHandler}} after {{LocalDirsHandlerService}},
{{AllocatorPerContext}} need be reinitialized because {{NM_LOCAL_DIRS}} value is changed.
This will cause some overhead.
> {code}
>       String newLocalDirs = conf.get(contextCfgItemName);
>       if (!newLocalDirs.equals(savedLocalDirs)) {
> {code}
> So it will be a good improvement to not share the same {{AllocatorPerContext}} instance
between {{ShuffleHandler}} and {{LocalDirsHandlerService}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message