Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-323

Improve the way job history files are managed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 0.21.0, 0.22.0
    • 0.20.203.0
    • jobtracker
    • None
    • Hide
      This patch does four things:

      * it changes the directory structure of the done directory that holds history logs for jobs that are completed,
      * it builds toy databases for completed jobs, so we no longer have to scan 2N files on DFS to find out facts about the N jobs that have completed since the job tracker started [which can be hundreds of thousands of files in practical cases],
      * it changes the job history browser to display more information and allow more filtering criteria, and
      * it creates a new programmatic interface for finding files matching user-chosen criteria. This allows users to no longer be concerned with our methods of storing them, in turn allowing us to change those at will.

      The new API described above, which can be used to programmatically obtain history file PATHs given search criteria, is described below:

          package org.apache.hadoop.mapreduce.jobhistory;
          ...

          // this interface is within O.A.H.mapreduce.jobhistory.JobHistory:

          // holds information about one job hostory log in the done
          // job history logs
          public static class JobHistoryJobRecord {
             public Path getPath() { ... }
             public String getJobIDString() { ... }
             public long getSubmitTime() { ... }
             public String getUserName() { ... }
             public String getJobName() { ... }
          }

          public class JobHistoryRecordRetriever implements Iterator<JobHistoryJobRecord> {
             // usual Interface methods -- remove() throws UnsupportedOperationException
             // returns the number of calls to next() that will succeed
             public int numMatches() { ... }
          }

          // returns a JobHistoryRecordRetriever that delivers all Path's of job matching job history files,
          // in no particular order. Any criterion that is null or the empty string does not constrain.
          // All criteria that are specified are applied conjunctively, except that if there's more than
          // one date you retrieve all Path's matching ANY date.
          // soughtUser and soughtJobid must match exactly.
          // soughtJobName can match the entire job name or any substring.
          // dates must be in the format exactly MM/DD/YYYY .
          // Dates' leading digits must be 2's . We're incubating a Y3K problem.
          public JobHistoryRecordRetriever getMatchingJob
              (String soughtUser, String soughtJobName, String[] dateStrings, String soughtJobid)
            throws IOException

      Show
      This patch does four things: * it changes the directory structure of the done directory that holds history logs for jobs that are completed, * it builds toy databases for completed jobs, so we no longer have to scan 2N files on DFS to find out facts about the N jobs that have completed since the job tracker started [which can be hundreds of thousands of files in practical cases], * it changes the job history browser to display more information and allow more filtering criteria, and * it creates a new programmatic interface for finding files matching user-chosen criteria. This allows users to no longer be concerned with our methods of storing them, in turn allowing us to change those at will. The new API described above, which can be used to programmatically obtain history file PATHs given search criteria, is described below:     package org.apache.hadoop.mapreduce.jobhistory;     ...     // this interface is within O.A.H.mapreduce.jobhistory.JobHistory:     // holds information about one job hostory log in the done     // job history logs     public static class JobHistoryJobRecord {        public Path getPath() { ... }        public String getJobIDString() { ... }        public long getSubmitTime() { ... }        public String getUserName() { ... }        public String getJobName() { ... }     }     public class JobHistoryRecordRetriever implements Iterator<JobHistoryJobRecord> {        // usual Interface methods -- remove() throws UnsupportedOperationException        // returns the number of calls to next() that will succeed        public int numMatches() { ... }     }     // returns a JobHistoryRecordRetriever that delivers all Path's of job matching job history files,     // in no particular order. Any criterion that is null or the empty string does not constrain.     // All criteria that are specified are applied conjunctively, except that if there's more than     // one date you retrieve all Path's matching ANY date.     // soughtUser and soughtJobid must match exactly.     // soughtJobName can match the entire job name or any substring.     // dates must be in the format exactly MM/DD/YYYY .     // Dates' leading digits must be 2's . We're incubating a Y3K problem.     public JobHistoryRecordRetriever getMatchingJob         (String soughtUser, String soughtJobName, String[] dateStrings, String soughtJobid)       throws IOException

    Description

      Today all the jobhistory files are dumped in one job-history folder. This can cause problems when there is a need to search the history folder (job-recovery etc). It would be nice if we group all the jobs under a user folder. So all the jobs for user amar will go in history-folder/amar/. Jobs can be categorized using various features like jobid, date, jobname etc but using username will make the search much more efficient and also will not result into namespace explosion.

      Attachments

        1. MR323--2010-09-07--1636.patch
          79 kB
          Dick King
        2. MR323--2010-08-27--1613.patch
          81 kB
          Dick King
        3. MR323--2010-08-27--1359.patch
          79 kB
          Dick King
        4. MR323--2010-08-25--1632.patch
          75 kB
          Dick King
        5. MR323--2010-08-20--1533.patch
          75 kB
          Dick King

        Issue Links

          Activity

            People

              dking Dick King
              amar_kamat Amar Kamat
              Votes:
              2 Vote for this issue
              Watchers:
              21 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: