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

Verify if JobHistory.HistoryCleaner works as expected

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.19.2
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: