public class HadoopExecutableManager extends ExecutableManager
HadoopExecutableManager
is a specialization of
ExecutableManager
and provides HDFS-specific support for secondary
outputs, task-logs etc.
HadoopExecutableManager
provides support for secondary outputs
of the managed process and also persists the logs of the tasks on HDFS.command, exitCode, inputBytes, inputRecords, outerrThreadsError, outputBytes, outputRecords, stdin
Constructor and Description |
---|
HadoopExecutableManager() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close and cleanup the
ExecutableManager . |
void |
configure(POStream stream)
Configure and initialize the
ExecutableManager . |
protected void |
exec()
Start execution of the external process.
|
protected void |
processError(java.lang.String error)
Workhorse to process the stderr stream of the managed process.
|
protected boolean |
writeErrorToHDFS(int limit,
java.lang.String taskId)
Should the stderr data of this task be persisted on HDFS?
|
run
public void configure(POStream stream) throws java.io.IOException, ExecException
ExecutableManager
ExecutableManager
.configure
in class ExecutableManager
stream
- POStream operatorjava.io.IOException
ExecException
protected void exec() throws java.io.IOException
ExecutableManager
stderr
of
the managed process.exec
in class ExecutableManager
java.io.IOException
public void close() throws java.io.IOException
ExecutableManager
ExecutableManager
.close
in class ExecutableManager
java.io.IOException
protected boolean writeErrorToHDFS(int limit, java.lang.String taskId)
limit
- maximum number of tasks whose stderr log-files are persistedtaskId
- id of the tasktrue
if stderr data of task should be persisted on
HDFS, false
otherwiseprotected void processError(java.lang.String error)
ExecutableManager
ExecuatbleManager
just sends out the received
error message to the stderr
of itself.processError
in class ExecutableManager
error
- error message from the managed process.Copyright © 2007-2017 The Apache Software Foundation