[
https://issues.apache.org/jira/browse/HDFS-5224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13788516#comment-13788516
]
Chris Nauroth commented on HDFS-5224:
-------------------------------------
[~cmccabe], if I understand correctly, you're advocating that we go ahead and
pass around {{PathBasedCacheDirective/Descriptor}} at all layers (client,
protocol, and NN implementation all the way down to {{CacheManager}}). The
path member will be a {{Path}}, not a {{String}}, and the implementation in the
NN will only use the path part and ignore all other URI components like scheme
and authority. This is accomplished by calling {{getPath().toUri().getPath()}}
in any NN code that needs to work with it. Am I understanding the proposal
correctly? If so, then the consequence is that we have a slightly odd data
type in the NN implementation (most components of {{Path}} will be ignored),
but the benefit is that we have fewer total classes.
(BTW, I'm not objecting to anything above, just trying to understand
trade-offs.)
bq. Keep in mind that we want the DistributedFileSystem to supply its current
working directory, and validate that the path matches its URI.
Yes, understood. The current patch already does this, and now I think we're
just working out the final state for refactoring this code.
> 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
>
>
> 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)