Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-5449

Verify if JobHistory.HistoryCleaner works as expected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 0.19.2
    • None
    • None
    • Reviewed

    Description

      Here is the piece of code I doubt

      public void run(){
            if (isRunning){
              return;
            }
            now = System.currentTimeMillis();
            // clean history only once a day at max
            if (lastRan ==0 || (now - lastRan) < ONE_DAY_IN_MS){
              return;
            }
            lastRan = now;
      .....
      // main code for cleaning
      }
      

      lastRun is initialized to 0 and hence HistoryCleaner will never execute the main code. Also a testcase should be written for JobHistory.HistoryCleaner to check if it works as expected.

      Attachments

        1. patch-5449.txt
          4 kB
          Amareshwari Sriramadasu

        Activity

          People

            amareshwari Amareshwari Sriramadasu
            amar_kamat Amar Kamat
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: