UserLogCleaner (Hadoop 0.20.2-cdh3u0 API)
Date: 2011-03-25

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.mapred
Class UserLogCleaner

    java.lang.Object
      java.lang.Thread
          org.apache.hadoop.mapred.UserLogCleaner

All Implemented Interfaces:
  Runnable

    public class UserLogCleaner

extends Thread

This is used only in UserLogManager, to manage cleanup of user logs.

Nested Class Summary

Nested classes/interfaces inherited from class java.lang.Thread
`Thread.State, Thread.UncaughtExceptionHandler`

Field Summary

Fields inherited from class java.lang.Thread
`MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

Constructor Summary
`UserLogCleaner(UserLogManager userLogManager, Configuration conf)`

Method Summary
`void` | `clearOldUserLogs(Configuration conf)` Clears all the logs in userlog 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, 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
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### UserLogCleaner

    public UserLogCleaner(UserLogManager userLogManager,
                          Configuration conf)
                   throws IOException

Throws:
  `IOException`

Method Detail

### run

    public void run()

  Specified by:
    `run` in interface `Runnable`
  Overrides:
    `run` in class `Thread`

### deleteJobLogs

    public void deleteJobLogs(JobID jobid)
                       throws IOException

  Throws:
    `IOException`

### clearOldUserLogs

    public void clearOldUserLogs(Configuration conf)
                          throws IOException

  Clears all the logs in userlog directory. Adds the job directories for deletion with default retain hours. Deletes all other directories, if any. This is usually called on reinit/restart of the TaskTracker

  Parameters:
    `conf` -
  Throws:
    `IOException`

### markJobLogsForDeletion

    public void markJobLogsForDeletion(long jobCompletionTime,
                                       int retainHours,
                                       JobID jobid)

  Adds job user-log directory to cleanup thread to delete logs after user-log retain hours.

  Parameters:
    `jobCompletionTime` - job completion time in millis
    `retainHours` - the user-log retain hours for the job
    `jobid` - JobID for which user logs should be deleted

### unmarkJobFromLogDeletion

    public void unmarkJobFromLogDeletion(JobID jobid)

  Remove job from user log deletion.

  Parameters:
    `jobid` -

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation