|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hama.bsp.TaskLog
public class TaskLog
A simple logger to handle the task-specific user logs.
Nested Class Summary | |
---|---|
static class |
TaskLog.LogName
The filter for userlogs. |
Constructor Summary | |
---|---|
TaskLog()
|
Method Summary | |
---|---|
static java.lang.String |
addCommand(java.util.List<java.lang.String> cmd,
boolean isExecutable)
Add quotes to each of the command strings and return as a single string |
static java.util.List<java.lang.String> |
captureDebugOut(java.util.List<java.lang.String> cmd,
java.io.File debugoutFilename)
Wrap a command in a shell to capture debug script's stdout and stderr to debugout. |
static java.util.List<java.lang.String> |
captureOutAndError(java.util.List<java.lang.String> cmd,
java.io.File stdoutFilename,
java.io.File stderrFilename,
long tailLength)
Wrap a command in a shell to capture stdout and stderr to files. |
static java.util.List<java.lang.String> |
captureOutAndError(java.util.List<java.lang.String> setup,
java.util.List<java.lang.String> cmd,
java.io.File stdoutFilename,
java.io.File stderrFilename,
long tailLength)
Wrap a command in a shell to capture stdout and stderr to files. |
static void |
cleanup(int logsRetainHours)
Purge old user logs. |
static java.io.File |
getTaskLogFile(TaskAttemptID taskid,
TaskLog.LogName filter)
|
static long |
getTaskLogLength(HamaConfiguration conf)
Get the desired maximum length of task's logs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TaskLog()
Method Detail |
---|
public static java.io.File getTaskLogFile(TaskAttemptID taskid, TaskLog.LogName filter)
public static void cleanup(int logsRetainHours) throws java.io.IOException
java.io.IOException
public static long getTaskLogLength(HamaConfiguration conf)
conf
- the job to look in
public static java.util.List<java.lang.String> captureOutAndError(java.util.List<java.lang.String> cmd, java.io.File stdoutFilename, java.io.File stderrFilename, long tailLength) throws java.io.IOException
cmd
- The command and the arguments that should be runstdoutFilename
- The filename that stdout should be saved tostderrFilename
- The filename that stderr should be saved totailLength
- The length of the tail to be saved.
java.io.IOException
public static java.util.List<java.lang.String> captureOutAndError(java.util.List<java.lang.String> setup, java.util.List<java.lang.String> cmd, java.io.File stdoutFilename, java.io.File stderrFilename, long tailLength) throws java.io.IOException
setup
- The setup commands for the execed process.cmd
- The command and the arguments that should be runstdoutFilename
- The filename that stdout should be saved tostderrFilename
- The filename that stderr should be saved totailLength
- The length of the tail to be saved.
java.io.IOException
public static java.lang.String addCommand(java.util.List<java.lang.String> cmd, boolean isExecutable) throws java.io.IOException
cmd
- The command to be quotedisExecutable
- makes shell path if the first argument is executable
java.io.IOException
public static java.util.List<java.lang.String> captureDebugOut(java.util.List<java.lang.String> cmd, java.io.File debugoutFilename) throws java.io.IOException
cmd
- The command and the arguments that should be rundebugoutFilename
- The filename that stdout and stderr should be saved
to.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |