public class UserLogCleaner
extends java.lang.Thread
| Constructor and Description |
|---|
UserLogCleaner(UserLogManager userLogManager,
org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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, yieldpublic UserLogCleaner(UserLogManager userLogManager, org.apache.hadoop.conf.Configuration conf) throws java.io.IOException
java.io.IOExceptionpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void deleteJobLogs(JobID jobid) throws java.io.IOException
java.io.IOExceptionpublic void addOldUserLogsForDeletion(java.io.File loc,
org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
loc - location of log directoryconf - java.io.IOExceptionpublic void clearOldUserLogs(org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
conf - java.io.IOExceptionpublic 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 - Copyright © 2009 The Apache Software Foundation