org.apache.pig.impl.builtin
Class ReadScalars
java.lang.Object
org.apache.pig.EvalFunc<Object>
org.apache.pig.impl.builtin.ReadScalars
public class ReadScalars
- extends EvalFunc<Object>
ReadScalars reads a line from a file and returns it as its value. The
file is only read once, and the same line is returned over and over again.
This is useful for incorporating a result from an agregation into another
evaluation.
Methods inherited from class org.apache.pig.EvalFunc |
finish, getArgToFuncMapping, getCacheFiles, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, isAsynchronous, outputSchema, progress, setPigLogger, setReporter, warn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReadScalars
public ReadScalars()
exec
public Object exec(Tuple input)
throws IOException
- Java level API
- Specified by:
exec
in class EvalFunc<Object>
- Parameters:
input
- expects a single constant that is the name of the file to be
read
- Returns:
- result, of type T.
- Throws:
IOException
setOutputBuffer
public void setOutputBuffer(Map<String,DataBag> inputBuffer)
Copyright © 2012 The Apache Software Foundation