|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ebay.erl.mobius.core.criterion.TupleCriterion
public abstract class TupleCriterion
Evaluates a Tuple
.
If the tuple is accepted after calling
accept(Tuple, Configuration)
, then
the tuple is populated.
This product is licensed under the Apache License, Version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0. This product contains portions derived from Apache hadoop which is licensed under the Apache License, Version 2.0, available at http://hadoop.apache.org. © 2007 – 2012 eBay Inc., Evan Chiu, Woody Zhou, Neel Sundaresan
TupleRestrictions
,
Serialized FormConstructor Summary | |
---|---|
TupleCriterion()
|
Method Summary | |
---|---|
boolean |
accept(Tuple tuple,
org.apache.hadoop.conf.Configuration configuration)
Test if the tuple meet this TupleCriterion or not |
TupleCriterion |
and(TupleCriterion another)
return a new TupleCriterion that represents
this AND another |
protected abstract 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. |
org.apache.hadoop.conf.Configuration |
getConf()
|
abstract java.lang.String[] |
getInvolvedColumns()
return an array of column names that are required by this criterion. |
TupleCriterion |
not()
Return a new instance of TupleCriterion that is the complement of this one. |
TupleCriterion |
or(TupleCriterion another)
return a new TupleCriterion that represents
this OR another |
void |
setConf(org.apache.hadoop.conf.Configuration conf)
|
static void |
validate(java.util.Set<java.lang.String> allAvailableColumns,
TupleCriterion criteria)
validate if the given criteria only use
the columns in the allAvailableColumns |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TupleCriterion()
Method Detail |
---|
public boolean accept(Tuple tuple, org.apache.hadoop.conf.Configuration configuration)
tuple
meet this TupleCriterion or not
tuple
- a tuple in a dataset to be testedconfiguration
-
true
if the tuple
pass this TupleCriterion, false
otherwise.public TupleCriterion and(TupleCriterion another)
TupleCriterion
that represents
this AND another
The another
and this
TupleCriterion
doesn't change.
public TupleCriterion or(TupleCriterion another)
TupleCriterion
that represents
this OR another.
The another
and this
TupleCriterion
doesn't change.
public final TupleCriterion not()
The original TupleCriterion will not be changed.
protected abstract boolean evaluate(Tuple tuple, org.apache.hadoop.conf.Configuration configuration)
tuple
meet the the criteria or not.
tuple
- a tuple to be testconfiguration
- Hadoop configuration
tuple
meets this criteria, false
otherwise.public abstract java.lang.String[] getInvolvedColumns()
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public static void validate(java.util.Set<java.lang.String> allAvailableColumns, TupleCriterion criteria) throws java.lang.IllegalArgumentException
criteria
only use
the columns in the allAvailableColumns
allAvailableColumns
- criteria
-
java.lang.IllegalArgumentException
- if the criteria
use some column(s) that
doesn't exist in the allAvailableColumns
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |