Class FileNameIndexUtils

java.lang.Object
org.apache.hadoop.mapreduce.v2.jobhistory.FileNameIndexUtils

public class FileNameIndexUtils extends Object
  • Constructor Details

    • FileNameIndexUtils

      public FileNameIndexUtils()
  • Method Details

    • getDoneFileName

      public static String getDoneFileName(JobIndexInfo indexInfo) throws IOException
      Constructs the job history file name from the JobIndexInfo.
      Parameters:
      indexInfo - the index info.
      Returns:
      the done job history filename.
      Throws:
      IOException
    • getDoneFileName

      public static String getDoneFileName(JobIndexInfo indexInfo, int jobNameLimit) throws IOException
      Throws:
      IOException
    • getIndexInfo

      public static JobIndexInfo getIndexInfo(String jhFileName) throws IOException
      Parses the provided job history file name to construct a JobIndexInfo object which is returned.
      Parameters:
      jhFileName - the job history filename.
      Returns:
      a JobIndexInfo object built from the filename.
      Throws:
      IOException
    • encodeJobHistoryFileName

      public static String encodeJobHistoryFileName(String logFileName) throws IOException
      Helper function to encode the URL of the filename of the job-history log file.
      Parameters:
      logFileName - file name of the job-history file
      Returns:
      URL encoded filename
      Throws:
      IOException
    • decodeJobHistoryFileName

      public static String decodeJobHistoryFileName(String logFileName) throws IOException
      Helper function to decode the URL of the filename of the job-history log file.
      Parameters:
      logFileName - file name of the job-history file
      Returns:
      URL decoded filename
      Throws:
      IOException