Initial import into git.
[galago.git] / java / pig-galago / src / com / yahoo / pig / BagEvalFunc.java
blobc321157a6bf5a1dbb2f739faa27a2a5a3baf3ea0
1 /*
2 * Copyright (c) 2007 Yahoo! Inc. All rights reserved.
3 * See accompanying LICENSE file.
4 */
5 package com.yahoo.pig;
7 import java.io.IOException;
9 import com.yahoo.pig.data.*;
11 /**
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
17 * at runtime.
19 * @author database-systems@yahoo.research
22 public abstract class BagEvalFunc extends EvalFunc {
24 /**
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.
32 * @throws IOException
34 abstract public void exec(Tuple input, DataCollector output) throws IOException;