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

Chen Liang commented on HDFS-12932:
-----------------------------------

Thanks [~csun] for the catch! I think maybe it's better to add a third branch 
to catch the {{==}} case. Just log a message saying it remains unchanged at 
that value. Because the current code always out a message for all three cases 
of {{=}} {{<}} and {{>}}. I think it's probably better we don't change the 
syntax here.

> Confusing LOG message for block replication
> -------------------------------------------
>
>                 Key: HDFS-12932
>                 URL: https://issues.apache.org/jira/browse/HDFS-12932
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs
>    Affects Versions: 2.8.3
>            Reporter: Chao Sun
>            Assignee: Chao Sun
>            Priority: Minor
>         Attachments: HDFS-12932.0.patch
>
>
> In our cluster we see large number of log messages such as the following:
> {code}
> 2017-12-15 22:55:54,603 INFO 
> org.apache.hadoop.hdfs.server.namenode.FSDirectory: Increasing replication 
> from 3 to 3 for <HDFS file>
> {code}
> This is a little confusing since "from 3 to 3" is not "increasing". Digging 
> into it, it seems related to this piece of code:
> {code}
>     if (oldBR != -1) {
>       if (oldBR > targetReplication) {
>         FSDirectory.LOG.info("Decreasing replication from {} to {} for {}",
>                              oldBR, targetReplication, iip.getPath());
>       } else {
>         FSDirectory.LOG.info("Increasing replication from {} to {} for {}",
>                              oldBR, targetReplication, iip.getPath());
>       }
>     }
> {code}
> Perhaps a {{oldBR == targetReplication}} case is missing?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to