com.ebay.erl.mobius.core.criterion
Class ColumnsCriterion
java.lang.Object
com.ebay.erl.mobius.core.criterion.TupleCriterion
com.ebay.erl.mobius.core.criterion.ColumnsCriterion
- All Implemented Interfaces:
- java.io.Serializable, org.apache.hadoop.conf.Configurable
public class ColumnsCriterion
- extends TupleCriterion
To create a TupleCriterion
instance that evaluate
the values relationship between two given columns in a row.
- See Also:
- Serialized Form
Method Summary |
protected boolean |
evaluate(Tuple tuple,
org.apache.hadoop.conf.Configuration configuration)
Sub class shall override this method to verify if the tuple
meet the the criteria or not. |
java.lang.String[] |
getInvolvedColumns()
return an array of column names that are required
by this criterion. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
column1
protected java.lang.String column1
column2
protected java.lang.String column2
operator
protected RelationalOperator operator
comparator
protected transient TupleColumnComparator comparator
involvedColumns
protected final java.lang.String[] involvedColumns
- Create a criterion that check the values from
column1
and
column2 follows the given operator
or not.
Only the following types of RelationalOperator
is supported:
RelationalOperator.EQ, RelationalOperator.NE,
RelationalOperator.GE, RelationalOperator.GT,
RelationalOperator.LE or RelationalOperator.LT
ColumnsCriterion
public ColumnsCriterion(java.lang.String column1,
java.lang.String column2,
RelationalOperator operator)
evaluate
protected boolean evaluate(Tuple tuple,
org.apache.hadoop.conf.Configuration configuration)
- Description copied from class:
TupleCriterion
- Sub class shall override this method to verify if the
tuple
meet the the criteria or not.
- Specified by:
evaluate
in class TupleCriterion
- Parameters:
tuple
- a tuple to be testconfiguration
- Hadoop configuration
- Returns:
- true if the
tuple
meets this criteria, false
otherwise.
getInvolvedColumns
public java.lang.String[] getInvolvedColumns()
- Description copied from class:
TupleCriterion
- return an array of column names that are required
by this criterion.
- Specified by:
getInvolvedColumns
in class TupleCriterion