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

Chris Nauroth commented on HDFS-5224:
-------------------------------------

bq. CacheAdmin#run: we already check that path is not null, so I don't think we 
need that ternary. The PCDir constructor already does a null check.

Yes, we don't need the check for {{AddPathBasedCacheDirectiveCommand}}, because 
it pre-validates the path string from the command line.  We do need the ternary 
for {{ListPathBasedCacheDirectiveCommand}} though, where a null path means 
"don't filter my result set on path".  I'll clean this up for the add case.

I'll look into the validation cleanup too, and add back {{EmptyPathError}}.

> Refactor PathBasedCache* methods to use a Path rather than a String
> -------------------------------------------------------------------
>
>                 Key: HDFS-5224
>                 URL: https://issues.apache.org/jira/browse/HDFS-5224
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode, namenode
>    Affects Versions: HDFS-4949
>            Reporter: Andrew Wang
>            Assignee: Chris Nauroth
>         Attachments: HDFS-5224.1.patch, HDFS-5224.2.patch
>
>
> As discussed in HDFS-5213, we should refactor PathBasedCacheDirective and 
> related methods in DistributedFileSystem to use a Path to represent paths to 
> cache, rather than a String.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to