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, yield
public UserLogCleaner(UserLogManager userLogManager, org.apache.hadoop.conf.Configuration conf) throws java.io.IOException
java.io.IOException
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
- Copyright © 2009 The Apache Software Foundation