|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.apache.hadoop.mapred.UserLogCleaner
public class UserLogCleaner
This is used only in UserLogManager, to manage cleanup of user logs.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
UserLogCleaner(UserLogManager userLogManager,
org.apache.hadoop.conf.Configuration conf)
|
Method Summary | |
---|---|
void |
addOldUserLogsForDeletion(java.io.File loc,
org.apache.hadoop.conf.Configuration conf)
Adds the job log directories for deletion with default retain hours. |
void |
clearOldUserLogs(org.apache.hadoop.conf.Configuration conf)
Clears all the logs in userlogs directory. |
void |
deleteJobLogs(JobID jobid)
|
void |
markJobLogsForDeletion(long jobCompletionTime,
int retainHours,
JobID jobid)
Adds job user-log directory to cleanup thread to delete logs after user-log retain hours. |
void |
run()
|
void |
unmarkJobFromLogDeletion(JobID jobid)
Remove job from user log deletion. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UserLogCleaner(UserLogManager userLogManager, org.apache.hadoop.conf.Configuration conf) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void deleteJobLogs(JobID jobid) throws java.io.IOException
java.io.IOException
public void addOldUserLogsForDeletion(java.io.File loc, org.apache.hadoop.conf.Configuration conf) throws java.io.IOException
loc
- location of log directoryconf
-
java.io.IOException
public void clearOldUserLogs(org.apache.hadoop.conf.Configuration conf) throws java.io.IOException
conf
-
java.io.IOException
public void markJobLogsForDeletion(long jobCompletionTime, int retainHours, JobID jobid)
jobCompletionTime
- job completion time in millisretainHours
- the user-log retain hours for the jobjobid
- JobID for which user logs should be deletedpublic void unmarkJobFromLogDeletion(JobID jobid)
jobid
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |