2 * Copyright (c) 2007 Yahoo! Inc. All rights reserved.
3 * See accompanying LICENSE file.
7 import java
.io
.IOException
;
9 import com
.yahoo
.pig
.impl
.logicalLayer
.schema
.SchemaItem
;
10 import com
.yahoo
.pig
.impl
.mapreduceExec
.PigMapReduce
;
13 * The class is used to implement functions to be applied to
14 * a dataset. The function is applied to each Tuple in the set.
15 * The programmer should not make assumptions about state maintained
16 * between invocations of the invoke() method since the Pig runtime
17 * will schedule and localize invocations based on information provided
20 * @author database-systems@yahoo.research
23 public abstract class EvalFunc
extends InstantiatedFunc
{
25 // report that progress is being made (otherwise hadoop times out after 600 seconds working on one outer tuple)
26 protected void progress() {
27 if (PigMapReduce
.reporter
!= null) {
28 PigMapReduce
.reporter
.progress();
33 * Returns the String representation of the function.
35 public String
toString() {
39 public SchemaItem
outputSchema() {