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

Rakesh R commented on HDFS-11401:
---------------------------------

Thank you [~cheersyang] for the patch. I've one comment.

With the patch, it is logging all exceptions with DEBUG level, right?
{code}
-      errMsg = "opReplaceBlock " + block + " received exception " + ioe; 
-      LOG.info(errMsg);
+      errMsg = "opReplaceBlock " + block + " received exception " + ioe;
+      if (LOG.isDebugEnabled()) {
+        LOG.debug(errMsg);
+      }
{code}
Instead, how about logging only the pinning err with DEBUG level and all other 
errs continue with INFO, like below?
{code}
      errMsg = "opReplaceBlock " + block + " received exception " + ioe; 
      if (ioe instanceof BlockPinningException) {
        opStatus = Status.ERROR_BLOCK_PINNED;
        if (LOG.isDebugEnabled()) {
          LOG.debug(errMsg);
        }
      } else {
        LOG.info(errMsg);
      }
{code}

> Reduce verbosity of logs with favored nodes and block pinning enabled
> ---------------------------------------------------------------------
>
>                 Key: HDFS-11401
>                 URL: https://issues.apache.org/jira/browse/HDFS-11401
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: balancer & mover, datanode
>    Affects Versions: 2.8.0
>            Reporter: Thiruvel Thirumoolan
>            Assignee: Weiwei Yang
>            Priority: Minor
>         Attachments: HDFS-11401.01.patch, HDFS-11401.02.patch, 
> testBalancerWithPinnedBlocks.output.txt
>
>
> I am working on enabling favored nodes for HBase (HBASE-15531). Was trying 
> out what happens if favored nodes is used and HDFS balancer is enabled. Ran 
> the unit test TestBalancer#testBalancerWithPinnedBlocks from branch-2.8.  
> There were too many exceptions and error messages with this (output attached) 
> since pinned blocks can't be moved.
> Is there any way to reduce this logging since block pinning is intentional? 
> On a real cluster, this could be too much. HDFS-6133 enabled block pinning.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to