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

Haibo Chen commented on YARN-7300:
----------------------------------

Thanks for the patch [~snemeth]! I have a few minor comments

1) In the LocalDirAllocator constructor, let's throw YarnRunTimeException to be 
more specific.

2) What do you think if we add another LocalDirAllocator constructor that takes 
a DiskValidator as an argument? That way, we can read from the diskvalidator 
configuration in LocalDirsHandlerService. Right now, it is hardcoded to 
BasiceDiskValidator. Combining with 1), we'll have one LocalDirAllocator(String 
contextCfgItemName, DiskValidator diskValidator) and another 
LocalAllocator(contexCfgItemName, new BasicDiskValidator())

3) Every diskvalidator passed to  obtainContext() is the instance variable 
diskValidator of LocalDirAllocator, so we can get rid of the parameter from 
obtainContext() method and reference 'diskvalidator' directly within the method.

 

> DiskValidator is not used in LocalDirAllocator
> ----------------------------------------------
>
>                 Key: YARN-7300
>                 URL: https://issues.apache.org/jira/browse/YARN-7300
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Haibo Chen
>            Assignee: Szilard Nemeth
>            Priority: Major
>         Attachments: YARN-7300.001.patch
>
>
> HADOOP-13254 introduced a pluggable disk validator to replace 
> DiskChecker.checkDir(). However, LocalDirAllocator still references the old 
> DiskChecker.checkDir(). It'd be nice to
> use the plugin uniformly so that user configurations take effect in all 
> places.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to