org.apache.pig.scripting
Class ScriptingOutputCapturer
java.lang.Object
org.apache.pig.scripting.ScriptingOutputCapturer
public class ScriptingOutputCapturer
- extends Object
This class helps a scripting UDF capture user output by managing when to capture output and where
the output is written to.
For illustrate, we will only capture output for the last run (with the final set of data) and
we need to keep track of the file containing that output for returning w/ the illustrate results.
For runs, all standard output is written to the user logs.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScriptingOutputCapturer
public ScriptingOutputCapturer(ExecType execType)
getStandardOutputRootWriteLocation
public String getStandardOutputRootWriteLocation()
getTaskLogDir
public String getTaskLogDir(String jobId,
String taskId)
startCapturingOutput
public static void startCapturingOutput()
getUdfOutput
public static Map<String,String> getUdfOutput()
throws IOException
- Throws:
IOException
registerOutputLocation
public void registerOutputLocation(String functionName,
String fileName)
getRunId
public static String getRunId()
isClassCapturingOutput
public static boolean isClassCapturingOutput()
isInstanceCapturingOutput
public boolean isInstanceCapturingOutput()
setInstanceCapturingOutput
public void setInstanceCapturingOutput(boolean instanceCapturingOutput)
Copyright © 2007-2012 The Apache Software Foundation