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

Colin Patrick McCabe commented on HDFS-5871:
--------------------------------------------

CacheDirective#toInfo will never create a CacheDirectiveInfo with {{isRelative 
== true}}.  The isRelative bit is used only by clients when creating the cache 
directives.  The patch is fine.  I recommend adding an 
assert(!expiry.isRelative()), though.

> Use PBHelper to serialize CacheDirectiveInfoExpirationProto
> -----------------------------------------------------------
>
>                 Key: HDFS-5871
>                 URL: https://issues.apache.org/jira/browse/HDFS-5871
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>    Affects Versions: HDFS-5698 (FSImage in protobuf)
>            Reporter: Haohui Mai
>            Assignee: Haohui Mai
>         Attachments: HDFS-5871.000.patch
>
>
> The current implementation of CacheManager serializes the 
> CacheDirectiveInfoExpirationProto in-house. It should call PBHelper.convert() 
>    to avoid code duplication.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to