@InterfaceAudience.Private @InterfaceStability.Unstable public final class CommitUtilsWithMR extends Object
Modifier and Type | Method and Description |
---|---|
static String |
formatAppAttemptDir(String jobUUID,
int appAttemptId)
Build the name of the job attempt directory.
|
static String |
formatJobDir(String jobUUID)
Build the name of the job directory, without
app attempt.
|
static int |
getAppAttemptId(org.apache.hadoop.mapreduce.JobContext context)
Get the Application Attempt ID for this job.
|
static org.apache.hadoop.fs.Path |
getBaseMagicTaskAttemptPath(org.apache.hadoop.mapreduce.TaskAttemptContext context,
String jobUUID,
org.apache.hadoop.fs.Path dest)
Get the base Magic attempt path, without any annotations to mark relative
references.
|
static String |
getConfigurationOption(org.apache.hadoop.mapreduce.JobContext context,
org.apache.hadoop.conf.Configuration fsConf,
String key,
String defVal)
Get a configuration option, with any value in the job configuration
taking priority over that in the filesystem.
|
static org.apache.hadoop.fs.Path |
getMagicJobAttemptPath(String jobUUID,
int appAttemptId,
org.apache.hadoop.fs.Path dest)
Compute the "magic" path for a job attempt.
|
static org.apache.hadoop.fs.Path |
getMagicJobAttemptsPath(org.apache.hadoop.fs.Path out,
String jobUUID)
Get the location of magic job attempts.
|
static org.apache.hadoop.fs.Path |
getMagicJobPath(String jobUUID,
org.apache.hadoop.fs.Path dest)
Compute the "magic" path for a job.
|
static org.apache.hadoop.fs.Path |
getMagicTaskAttemptPath(org.apache.hadoop.mapreduce.TaskAttemptContext context,
String jobUUID,
org.apache.hadoop.fs.Path dest)
Compute the path where the output of a task attempt is stored until
that task is committed.
|
static org.apache.hadoop.fs.Path |
getMagicTaskAttemptsPath(String jobUUID,
org.apache.hadoop.fs.Path dest,
int appAttemptId)
Compute the path where the output of magic task attempts are stored.
|
static org.apache.hadoop.fs.Path |
getTempJobAttemptPath(String jobUUID,
org.apache.hadoop.fs.Path out,
int appAttemptId)
Compute a path for temporary data associated with a job.
|
static org.apache.hadoop.fs.Path |
getTempTaskAttemptPath(org.apache.hadoop.mapreduce.TaskAttemptContext context,
String jobUUID,
org.apache.hadoop.fs.Path out)
Compute the path where the output of a given task attempt will be placed.
|
static String |
jobIdString(org.apache.hadoop.mapreduce.JobContext context)
Get a string value of a job ID; returns meaningful text if there is no ID.
|
static String |
jobName(org.apache.hadoop.mapreduce.JobContext context)
Get a job name; returns meaningful text if there is no name.
|
public static org.apache.hadoop.fs.Path getMagicJobAttemptsPath(org.apache.hadoop.fs.Path out, String jobUUID)
out
- the base output directory.jobUUID
- unique Job ID.public static int getAppAttemptId(org.apache.hadoop.mapreduce.JobContext context)
context
- the context to look inpublic static org.apache.hadoop.fs.Path getMagicJobAttemptPath(String jobUUID, int appAttemptId, org.apache.hadoop.fs.Path dest)
jobUUID
- unique Job ID.appAttemptId
- the ID of the application attempt for this job.dest
- the final output directorypublic static org.apache.hadoop.fs.Path getMagicJobPath(String jobUUID, org.apache.hadoop.fs.Path dest)
jobUUID
- unique Job ID.dest
- the final output directorypublic static String formatJobDir(String jobUUID)
jobUUID
- unique Job ID.public static String formatAppAttemptDir(String jobUUID, int appAttemptId)
jobUUID
- unique Job ID.appAttemptId
- the ID of the application attempt for this job.public static org.apache.hadoop.fs.Path getMagicTaskAttemptsPath(String jobUUID, org.apache.hadoop.fs.Path dest, int appAttemptId)
jobUUID
- unique Job ID.dest
- destination of workappAttemptId
- the ID of the application attempt for this job.public static org.apache.hadoop.fs.Path getMagicTaskAttemptPath(org.apache.hadoop.mapreduce.TaskAttemptContext context, String jobUUID, org.apache.hadoop.fs.Path dest)
context
- the context of the task attempt.jobUUID
- unique Job ID.dest
- The output path to commit work intopublic static org.apache.hadoop.fs.Path getBaseMagicTaskAttemptPath(org.apache.hadoop.mapreduce.TaskAttemptContext context, String jobUUID, org.apache.hadoop.fs.Path dest)
context
- task context.jobUUID
- unique Job ID.dest
- The output path to commit work intopublic static org.apache.hadoop.fs.Path getTempJobAttemptPath(String jobUUID, org.apache.hadoop.fs.Path out, int appAttemptId)
jobUUID
- unique Job ID.out
- output directory of jobappAttemptId
- the ID of the application attempt for this job.public static org.apache.hadoop.fs.Path getTempTaskAttemptPath(org.apache.hadoop.mapreduce.TaskAttemptContext context, String jobUUID, org.apache.hadoop.fs.Path out)
context
- task contextjobUUID
- unique Job ID.out
- output directory of jobpublic static String jobIdString(org.apache.hadoop.mapreduce.JobContext context)
context
- job contextpublic static String jobName(org.apache.hadoop.mapreduce.JobContext context)
context
- job contextpublic static String getConfigurationOption(org.apache.hadoop.mapreduce.JobContext context, org.apache.hadoop.conf.Configuration fsConf, String key, String defVal)
context
- job/task contextfsConf
- filesystem configuration. Get this from the FS to guarantee
per-bucket parameter propagationkey
- key to look fordefVal
- default valueCopyright © 2008–2024 Apache Software Foundation. All rights reserved.