|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.mapred.JobHistory.JobInfo
public static class JobHistory.JobInfo
Helper class for logging or reading back events related to job start, finish or failure.
Constructor Summary | |
---|---|
JobHistory.JobInfo(String jobId)
Create new JobInfo |
Method Summary | |
---|---|
static String |
decodeJobHistoryFileName(String logFileName)
Helper function to decode the URL of the filename of the job-history log file. |
static String |
encodeJobHistoryFileName(String logFileName)
Helper function to encode the URL of the filename of the job-history log file. |
static String |
encodeJobHistoryFilePath(String logFile)
Helper function to encode the URL of the path of the job-history log file. |
String |
get(JobHistory.Keys k)
Get 'String' value for given key. |
Map<String,JobHistory.Task> |
getAllTasks()
Returns all map and reduce tasks |
int |
getInt(JobHistory.Keys k)
Convert value from history to int and return. |
Map<JobACL,AccessControlList> |
getJobACLs()
Get the job acls. |
static String |
getJobHistoryFileName(JobConf jobConf,
JobID id)
Recover the job history filename from the history folder. |
static Path |
getJobHistoryLogLocation(String logFileName)
Get the job history file path given the history filename |
static Path |
getJobHistoryLogLocationForUser(String logFileName,
JobConf jobConf)
Get the user job history file path |
static String |
getLocalJobFilePath(JobID jobId)
Get the path of the locally stored job file |
long |
getLong(JobHistory.Keys k)
Convert value from history to int and return. |
static String |
getUserName(JobConf jobConf)
Get the user name from the job conf |
Map<JobHistory.Keys,String> |
getValues()
Returns Map containing all key-values. |
void |
handle(Map<JobHistory.Keys,String> values)
Reads values back from the history, input is same Map as passed to Listener by parseHistory(). |
static void |
logFailed(JobID jobid,
long timestamp,
int finishedMaps,
int finishedReduces,
String failReason)
Logs job failed event. |
static void |
logFinished(JobID jobId,
long finishTime,
int finishedMaps,
int finishedReduces,
int failedMaps,
int failedReduces,
Counters mapCounters,
Counters reduceCounters,
Counters counters)
Log job finished. |
static void |
logInited(JobID jobId,
long startTime,
int totalMaps,
int totalReduces)
Logs launch time of job. |
static void |
logJobInfo(JobID jobid,
long submitTime,
long launchTime)
|
static void |
logJobInfo(JobID jobid,
long submitTime,
long launchTime,
int restartCount)
Deprecated. Use logJobInfo(JobID, long, long) instead. |
static void |
logJobPriority(JobID jobid,
JobPriority priority)
Log job's priority. |
static void |
logKilled(JobID jobid,
long timestamp,
int finishedMaps,
int finishedReduces)
Logs job killed event. |
static void |
logStarted(JobID jobId)
Logs job as running |
static void |
logStarted(JobID jobId,
long startTime,
int totalMaps,
int totalReduces)
Deprecated. Use logInited(JobID, long, int, int) and
logStarted(JobID) |
static void |
logSubmitted(JobID jobId,
JobConf jobConf,
String jobConfPath,
long submitTime)
Deprecated. Use logSubmitted(JobID, JobConf, String, long, boolean) instead. |
static void |
logSubmitted(JobID jobId,
JobConf jobConf,
String jobConfPath,
long submitTime,
boolean restarted)
|
static Path |
recoverJobHistoryFile(JobConf conf,
Path logFilePath)
Selects one of the two files generated as a part of recovery. |
void |
set(JobHistory.Keys k,
String s)
Set value for the key. |
void |
set(Map<JobHistory.Keys,String> m)
Adds all values in the Map argument to its own values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JobHistory.JobInfo(String jobId)
Method Detail |
---|
public Map<String,JobHistory.Task> getAllTasks()
public Map<JobACL,AccessControlList> getJobACLs()
Map
from JobACL
to AccessControlList
public void handle(Map<JobHistory.Keys,String> values)
public static String getLocalJobFilePath(JobID jobId)
jobId
- id of the job
public static String encodeJobHistoryFilePath(String logFile) throws IOException
logFile
- path of the job-history file
IOException
public static String encodeJobHistoryFileName(String logFileName) throws IOException
logFileName
- file name of the job-history file
IOException
public static String decodeJobHistoryFileName(String logFileName) throws IOException
logFileName
- file name of the job-history file
IOException
public static String getUserName(JobConf jobConf)
public static Path getJobHistoryLogLocation(String logFileName)
public static Path getJobHistoryLogLocationForUser(String logFileName, JobConf jobConf)
public static String getJobHistoryFileName(JobConf jobConf, JobID id) throws IOException
jobConf
- the job confid
- job id
IOException
public static Path recoverJobHistoryFile(JobConf conf, Path logFilePath) throws IOException
conf
- job conflogFilePath
- Path of the log file
IOException
@Deprecated public static void logSubmitted(JobID jobId, JobConf jobConf, String jobConfPath, long submitTime) throws IOException
logSubmitted(JobID, JobConf, String, long, boolean)
instead.
jobId
- job id assigned by job tracker.jobConf
- job conf of the jobjobConfPath
- path to job conf xml file in HDFS.submitTime
- time when job tracker received the job
IOException
public static void logSubmitted(JobID jobId, JobConf jobConf, String jobConfPath, long submitTime, boolean restarted) throws IOException
IOException
public static void logInited(JobID jobId, long startTime, int totalMaps, int totalReduces)
jobId
- job id, assigned by jobtracker.startTime
- start time of job.totalMaps
- total maps assigned by jobtracker.totalReduces
- total reduces.@Deprecated public static void logStarted(JobID jobId, long startTime, int totalMaps, int totalReduces)
logInited(JobID, long, int, int)
and
logStarted(JobID)
jobId
- job id, assigned by jobtracker.startTime
- start time of job.totalMaps
- total maps assigned by jobtracker.totalReduces
- total reduces.public static void logStarted(JobID jobId)
jobId
- job id, assigned by jobtracker.public static void logFinished(JobID jobId, long finishTime, int finishedMaps, int finishedReduces, int failedMaps, int failedReduces, Counters mapCounters, Counters reduceCounters, Counters counters)
jobId
- job id, assigned by jobtracker.finishTime
- finish time of job in ms.finishedMaps
- no of maps successfully finished.finishedReduces
- no of reduces finished sucessfully.failedMaps
- no of failed map tasks.failedReduces
- no of failed reduce tasks.counters
- the counters from the jobpublic static void logFailed(JobID jobid, long timestamp, int finishedMaps, int finishedReduces, String failReason)
jobid
- job idtimestamp
- time when job failure was detected in ms.finishedMaps
- no finished map tasks.finishedReduces
- no of finished reduce tasks.public static void logKilled(JobID jobid, long timestamp, int finishedMaps, int finishedReduces)
jobid
- job idtimestamp
- time when job killed was issued in ms.finishedMaps
- no finished map tasks.finishedReduces
- no of finished reduce tasks.public static void logJobPriority(JobID jobid, JobPriority priority)
jobid
- job idpriority
- Jobs priority@Deprecated public static void logJobInfo(JobID jobid, long submitTime, long launchTime, int restartCount)
logJobInfo(JobID, long, long)
instead.
jobid
- job idsubmitTime
- job's submit timelaunchTime
- job's launch timerestartCount
- number of times the job got restartedpublic static void logJobInfo(JobID jobid, long submitTime, long launchTime)
public String get(JobHistory.Keys k)
k
-
public int getInt(JobHistory.Keys k)
k
- keypublic long getLong(JobHistory.Keys k)
k
- public void set(JobHistory.Keys k, String s)
k
- s
- public void set(Map<JobHistory.Keys,String> m)
m
- public Map<JobHistory.Keys,String> getValues()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |