本文整理汇总了Java中org.apache.hadoop.mapred.JobStatus.FAILED属性的典型用法代码示例。如果您正苦于以下问题:Java JobStatus.FAILED属性的具体用法?Java JobStatus.FAILED怎么用?Java JobStatus.FAILED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.hadoop.mapred.JobStatus
的用法示例。
在下文中一共展示了JobStatus.FAILED属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: convertMapreduceState
/**
* Convert map-reduce specific job status constants to Sqoop job status
* constants.
*
* @param status Map-reduce job constant
* @return Equivalent submission status
*/
private SubmissionStatus convertMapreduceState(int status) {
if(status == JobStatus.PREP) {
return SubmissionStatus.BOOTING;
} else if (status == JobStatus.RUNNING) {
return SubmissionStatus.RUNNING;
} else if (status == JobStatus.FAILED) {
return SubmissionStatus.FAILED;
} else if (status == JobStatus.KILLED) {
return SubmissionStatus.FAILED;
} else if (status == JobStatus.SUCCEEDED) {
return SubmissionStatus.SUCCEEDED;
}
throw new SqoopException(MapreduceSubmissionError.MAPREDUCE_0004,
"Unknown status " + status);
}
示例2: ofInt
static JobState ofInt(int state) {
if (state == JobStatus.PREP) {
return PREPARE;
}
else if (state == JobStatus.RUNNING) {
return RUNNING;
}
else if (state == JobStatus.FAILED) {
return FAILED;
}
else if (state == JobStatus.SUCCEEDED) {
return SUCCEEDED;
}
else {
return null;
}
}
示例3: ofInt
static JobState ofInt(int state) {
switch (state) {
case JobStatus.PREP:
return PREPARE;
case JobStatus.RUNNING:
return RUNNING;
case JobStatus.FAILED:
return FAILED;
case JobStatus.SUCCEEDED:
return SUCCEEDED;
default:
return null;
}
}
示例4: getJobState
@Override
public int getJobState() throws IOException {
return isComplete()?JobStatus.SUCCEEDED:JobStatus.FAILED;
}