hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-5224) Refactor PathBasedCache* methods to use a Path rather than a String
Date Tue, 08 Oct 2013 05:10:43 GMT

     [ https://issues.apache.org/jira/browse/HDFS-5224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Chris Nauroth updated HDFS-5224:

    Attachment: HDFS-5224.2.patch

Here is version 2 of the patch.

bq. Is it acceptable to have the descriptor's internal representation still be a String, but
then turn it into a Path for the client in the getter?

I wound up not doing this, because it didn't seem to simplify anything in practice.  On the
client side, it causes an extra trip through the {{Path}} constructor.  On the server side,
code like {{CacheManager}} still ends up needing to turn the {{Path}} back into a {{String}}.

The fundamental problem here is that the client wants a URI, and the NN wants just a path.
 If we don't want to define different data types to represent that difference, then we need
to overload the meaning of something.  Putting a {{Path}} in the object and unpacking in a
few places in the NN seems like the least intrusive way to do that, so I'm OK with this. 
Let me know what you think.

> 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

View raw message