[
https://issues.apache.org/jira/browse/HDFS-5314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13788545#comment-13788545
]
Andrew Wang commented on HDFS-5314:
-----------------------------------
Hey Colin, patch makes sense to me. +1 after the following are addressed:
* Add some more class Javadoc for CachePoolInfo. I'd like to see mention of
where it's used (client-side and serialization in general in the edit log) and
where defaults are supplied for missing values.
* Add/fix Javadoc for CachePool, the clients comment is no longer entirely
accurate per above
* Can we make the CachePool constructor private? Else it'd benefit from a
javadoc pointer to the new static methods.
* Can rename {{createFromPoolInfoAndDefaults}} to {{fromInfoWithDefaults}},
{{createFromPoolInfo}} to {{fromInfo}} to be more concise.
> Do not expose CachePool type in AddCachePoolOp
> ----------------------------------------------
>
> Key: HDFS-5314
> URL: https://issues.apache.org/jira/browse/HDFS-5314
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: namenode
> Affects Versions: HDFS-4949
> Reporter: Colin Patrick McCabe
> Assignee: Colin Patrick McCabe
> Attachments: HDFS-5314-caching.001.patch
>
>
> {{CachePool}} is an internal type which should not be exposed or used in the
> {{FSEditLog}}. Because {{CachePool}} is mutable, storing a reference to it
> in an edit log operation could lead to the edit log operation changing as a
> result of the {{CachePool}} object being changed. Instead, we should store
> {{CachePoolInfo}}.
--
This message was sent by Atlassian JIRA
(v6.1#6144)