Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-14158

Checkpointer ignores configured time period > 5 minutes

    XMLWordPrintableJSON

Details

    • Reviewed
    • Fix the Checkpointer not to ignore the configured "dfs.namenode.checkpoint.period" > 5 minutes

    Description

      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):

      //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();
        }
      

      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:

      if(checkpointConf.getPeriod() > periodMSec) {
          periodMSec = checkpointConf.getPeriod();
        }
      

       

      Then "dfs.namenode.checkpoint.period" won't get ignored.

      Attachments

        1. 449.patch
          7 kB
          Akira Ajisaka
        2. HDFS-14158-trunk-001.patch
          4 kB
          Timo Walter
        3. HDFS-14158-trunk-002.patch
          7 kB
          Timo Walter

        Activity

          People

            tiwalter Timo Walter
            tiwalter Timo Walter
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: