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

ASF GitHub Bot commented on HDFS-14158:
---------------------------------------

GitHub user tiwalter opened a pull request:

    https://github.com/apache/hadoop/pull/449

    HDFS-14158. Correct if statement in Checkpointer.java

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tiwalter/hadoop trunk

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/hadoop/pull/449.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #449
    
----
commit d3910693b78c0dba54c10e944316e0de485277f6
Author: tiwalter <walter.timoand@...>
Date:   2018-12-18T13:21:19Z

    HDFS-14158. Correct if statement in Checkpointer.java

----


> Checkpointer ignores configured time period > 5 minutes
> -------------------------------------------------------
>
>                 Key: HDFS-14158
>                 URL: https://issues.apache.org/jira/browse/HDFS-14158
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 2.8.1
>            Reporter: Timo Walter
>            Priority: Minor
>              Labels: checkpoint, hdfs, namenode
>
> The checkpointer always triggers a checkpoint every 5 minutes and ignores the 
> flag "*dfs.namenode.checkpoint.period*", if its greater than 5 minutes.
> See the code below (in Checkpointer.java):
> {code:java}
> //Main work loop of the Checkpointer
> public void run() {
>   // Check the size of the edit log once every 5 minutes.
>   long periodMSec = 5 * 60;   // 5 minutes
>   if(checkpointConf.getPeriod() < periodMSec) {
>     periodMSec = checkpointConf.getPeriod();
>   }
> {code}
> If the configured period ("*dfs.namenode.checkpoint.period*") is lower than 5 
> minutes, you choose use the configured one. But it always ignores it, if it's 
> greater than 5 minutes.
>  
> In my opinion, the if-expression should be:
> {code:java}
> if(checkpointConf.getPeriod() > periodMSec) {
>     periodMSec = checkpointConf.getPeriod();
>   }
> {code}
>  
> Then "*dfs.namenode.checkpoint.period*" won't get ignored.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to