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

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

{code}
+      append(", filesAffected:").append(filesNeeded).
{code}
Should be filesNeeded  in the string.

{code}
     if (LOG.isTraceEnabled()) {
-      LOG.debug("Directive " + pce.getId() + " is caching " +
-          file.getFullPathName() + ": " + cachedTotal + "/" + neededTotal);
+      LOG.debug("Directive " + directive.getId() + " is caching " +
+          file.getFullPathName() + ": " + cachedTotal + "/" + neededTotal +
+          " bytes");
{code}

You're checking for trace, but printing as debug.  Pick one (probably trace).  
This is a pre-existing bug, I know.

{code}
           CachePoolInfo info = entry.getInfo();
-          String[] row = new String[5];
+          String[] row = new String[numColumns];
           if (name == null || info.getPoolName().equals(name)) {
             row[0] = info.getPoolName();
           ...
{code}

It would be nicer to use a LinkedList here with toArray at the end, I think

{code}
+          LOG.info("XXX: while start");
{code}

Looks like a leftover.  There are some others.

> Hook up cache directive and pool usage statistics
> -------------------------------------------------
>
>                 Key: HDFS-5630
>                 URL: https://issues.apache.org/jira/browse/HDFS-5630
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: caching, namenode
>    Affects Versions: 3.0.0
>            Reporter: Andrew Wang
>            Assignee: Andrew Wang
>         Attachments: hdfs-5630-1.patch
>
>
> Right now we have stubs for bytes/files statistics for cache pools, but we 
> need to hook them up so they're actually being tracked.
> This is a pre-requisite for enforcing per-pool quotas.



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

Reply via email to