2 * Copyright (c) 2007 Yahoo! Inc. All rights reserved.
3 * See accompanying LICENSE file.
7 import java
.io
.IOException
;
9 import com
.yahoo
.pig
.data
.*;
12 * The class is used to implement functions to be applied to
13 * a dataset. The function is applied to each Tuple in the set.
14 * The programmer should not make assumptions about state maintained
15 * between invocations of the invoke() method since the Pig runtime
16 * will schedule and localize invocations based on information provided
19 * @author database-systems@yahoo.research
22 public abstract class BagEvalFunc
extends EvalFunc
{
25 * This callback method must be implemented by all subclasses. This
26 * is the method that will be invoked on every Tuple of a given dataset.
27 * Since the dataset may be divided up in a variety of ways the programmer
28 * should not make assumptions about state that is maintained between
29 * invocations of this method.
31 * @param input the Tuple to be processed.
34 abstract public void exec(Tuple input
, DataCollector output
) throws IOException
;