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

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

bq. Is the subclass that gross here? You could PBCD.Builder(subclass) still to 
seed the PBCD for modification, and thus hide the new setter/getters. Just 
thinking about how we might clean up the API.

The problem is, {{PathBasedCacheDirective}} is in package 
{{org/apache/hadoop/hdfs/protocol/}}, whereas a lot of the code that creates it 
is in {{org/apache/hadoop/hdfs/server/blockmanagement/}} and other packages.  
So whatever subclasses we added would have to be public, and therefore 
accessible to API users.  I really think making more subclasses would just 
generate confusion because users would have trouble figuring out which one to 
use.

Maybe a smarter thing to do would be to have a separate DirectiveStats class, 
and have the remote iterator return a tuple of (directiveInfo, directiveStats). 
 Maybe after the great renaming.

bq. Yea, you're right on the copying. Didn't realize that. You could pass the 
config param in to the function to put this in DFSUtil still; there are other 
functions like this one there, which is why I suggested it.

Yeah, but it's a tiny function.

bq. Could you file the follow on JIRA then? thanks.

Filed as HDFS-5534.

> add more debugging for cache rescan
> -----------------------------------
>
>                 Key: HDFS-5451
>                 URL: https://issues.apache.org/jira/browse/HDFS-5451
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode, namenode
>    Affects Versions: 3.0.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>         Attachments: HDFS-5451.001.patch, HDFS-5451.002.patch, 
> HDFS-5451.003.patch, HDFS-5451.004.patch
>
>
> It would be nice to have message at DEBUG level that described all the 
> decisions we made for cache entries.  That way we could turn on this 
> debugging to get more information.  We should also store the number of bytes 
> each PBCE wanted, and the number of bytes it got, plus the number of inodes 
> it got, and output those in {{listDirectives}}.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to