[
https://issues.apache.org/jira/browse/HDFS-5158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13763827#comment-13763827
]
Aaron T. Myers commented on HDFS-5158:
--------------------------------------
A few high-level comments:
# I think the name "path cache" used throughout the patch and commands is a
pretty bad one. At first blush, that would probably lead most users to think
that this is a "cache of resolved paths" or something, rather than a cache of
file data, identified by paths. I recommend you change all the class/method
names referring to cached paths from "PathCache" to be "CachePath" or perhaps
better "CachedPath", and that you change the command name to be "cacheadmin"
both to be consistent with the other commands like haadmin and dfsadmin, and so
that we can later expand it to include other cache-related commands.
# Why is it that the {{add}} and {{remove}} methods and RPCs both take lists of
paths/pools, but the actual command line commands only ever take a single
identifier? Seems to me like we should change the methods/RPCs to only take a
single argument here.
# Not clear to me why both the {{list}} and {{add}} commands take paths/pools
as arguments, but the {{remove}} command takes an {{id}}. Why not make that
command symmetric with the others?
And a few small comments:
# I don't think these are accurate anymore regarding the empty string after you
addressed Andrew's earlier comment:
{code}
+ * @param pool The cache pool to list, or the empty string to list all pools.
+ * @param path The path name to list, or the empty string to list all paths.
{code}
# You should definitely include the actual invalid path name in this error:
{code}
+ throw new IOException("invalid path name.");
{code}
# If you mark some class as being {{InterfaceAudience.Private}} then there's no
need to also mark its {{InterfaceStability}}, since there should be no external
consumers of it. You do this in a few places.
> add command-line support for manipulating cache directives
> ----------------------------------------------------------
>
> Key: HDFS-5158
> URL: https://issues.apache.org/jira/browse/HDFS-5158
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: datanode, namenode
> Affects Versions: HDFS-4949
> Reporter: Colin Patrick McCabe
> Assignee: Colin Patrick McCabe
> Attachments: HDFS-5158-caching.003.patch,
> HDFS-5158-caching.004.patch, HDFS-5158-caching.005.patch
>
>
> We should add command-line support for creating, removing, and listing cache
> directives.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira