blob: e6357a2324372f6f1fd716d010e14726ad5adb2d [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.pig;
import java.io.IOException;
import org.apache.pig.data.Tuple;
public abstract class FilterFunc {
/**
* This callback method must be implemented by all subclasses. This
* is the method that will be invoked on every Tuple of a given dataset.
* Since the dataset may be divided up in a variety of ways the programmer
* should not make assumptions about state that is maintained between
* invocations of this method.
*
* @param input the Tuple to be processed.
* @throws IOException
*/
abstract public boolean exec(Tuple input) throws IOException;
/**
* Placeholder for cleanup to be performed at the end. User defined functions can override.
*
*/
public void finish(){}
}