org.apache.hadoop.mapreduce.v2.hs

## Interface HistoryStorage

-     @InterfaceAudience.Public
       @InterfaceStability.Unstable
      public interface HistoryStorage

  Provides an API to query jobs that have finished. For those implementing this API be aware that there is no feedback when files are removed from HDFS. You may rely on HistoryFileManager to help you know when that has happened if you have not made a complete backup of the data stored on HDFS.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<org.apache.hadoop.mapreduce.v2.api.records.JobId,org.apache.hadoop.mapreduce.v2.app.job.Job>` | `getAllPartialJobs()` Get all of the cached jobs.
    `org.apache.hadoop.mapreduce.v2.app.job.Job` | `getFullJob(org.apache.hadoop.mapreduce.v2.api.records.JobId jobId)` Get a fully parsed job.
    `org.apache.hadoop.mapreduce.v2.hs.webapp.dao.JobsInfo` | `getPartialJobs(Long offset, Long count, String user, String queue, Long sBegin, Long sEnd, Long fBegin, Long fEnd, org.apache.hadoop.mapreduce.v2.api.records.JobState jobState)` Look for a set of partial jobs.
    `void` | `setHistoryFileManager(HistoryFileManager hsManager)` Give the Storage a reference to a class that can be used to interact with history files.

- - ### Method Detail

    - #### setHistoryFileManager

          void setHistoryFileManager(HistoryFileManager hsManager)

      Give the Storage a reference to a class that can be used to interact with history files.
      Parameters:
        `hsManager` - the class that is used to interact with history files.

    - #### getPartialJobs

          org.apache.hadoop.mapreduce.v2.hs.webapp.dao.JobsInfo getPartialJobs(Long offset,
                                                                               Long count,
                                                                               String user,
                                                                               String queue,
                                                                               Long sBegin,
                                                                               Long sEnd,
                                                                               Long fBegin,
                                                                               Long fEnd,
                                                                               org.apache.hadoop.mapreduce.v2.api.records.JobState jobState)

      Look for a set of partial jobs.
      Parameters:
        `offset` - the offset into the list of jobs.
        `count` - the maximum number of jobs to return.
        `user` - only return jobs for the given user.
        `queue` - only return jobs for in the given queue.
        `sBegin` - only return Jobs that started on or after the given time.
        `sEnd` - only return Jobs that started on or before the given time.
        `fBegin` - only return Jobs that ended on or after the given time.
        `fEnd` - only return Jobs that ended on or before the given time.
        `jobState` - only return Jobs that are in the given job state.
      Returns:
        The list of filtered jobs.

    - #### getAllPartialJobs

          Map<org.apache.hadoop.mapreduce.v2.api.records.JobId,org.apache.hadoop.mapreduce.v2.app.job.Job> getAllPartialJobs()

      Get all of the cached jobs. This only returns partial jobs and is here for legacy reasons.
      Returns:
        all of the cached jobs

    - #### getFullJob

          org.apache.hadoop.mapreduce.v2.app.job.Job getFullJob(org.apache.hadoop.mapreduce.v2.api.records.JobId jobId)

      Get a fully parsed job.
      Parameters:
        `jobId` - the id of the job
      Returns:
        the job, or null if it is not found.

Copyright © 2022 Apache Software Foundation. All rights reserved.