L - the left value type (provides lookup table for this type)R - the right value type (looking up using this type)public abstract class JoinResource<L extends org.apache.hadoop.io.Writable,R> extends Object implements FlowResource
| Constructor and Description |
|---|
JoinResource() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract LookUpKey |
buildLeftKey(L value,
LookUpKey buffer)
Returns a lookup key from a left value.
|
protected abstract LookUpKey |
buildRightKey(R value,
LookUpKey buffer)
Returns a lookup key from a right value.
|
protected LookUpTable.Builder<L> |
createLookUpTable()
Returns a builder for building a new lookup table.
|
protected abstract L |
createValueObject()
Returns a new left value object.
|
List<L> |
find(R value)
Looks up left values from the related right value.
|
protected abstract String |
getCacheName()
Returns the name of Hadoop distributed cache which provides contents of the lookup table.
|
void |
setup(org.apache.hadoop.mapreduce.JobContext context)
Initializes this resource.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcleanuppublic void setup(org.apache.hadoop.mapreduce.JobContext context)
throws IOException,
InterruptedException
FlowResourcesetup in interface FlowResourcecontext - the current job contextIOException - if failed to initialize this resourceInterruptedException - if interrupted while initializing this resourceprotected LookUpTable.Builder<L> createLookUpTable()
protected abstract String getCacheName()
protected abstract L createValueObject()
protected abstract LookUpKey buildLeftKey(L value, LookUpKey buffer) throws IOException
value - the left valuebuffer - the key bufferIOException - if error occurred while building the lookup keyIllegalArgumentException - if some parameters are nullprotected abstract LookUpKey buildRightKey(R value, LookUpKey buffer) throws IOException
value - the right valuebuffer - the key bufferIOException - if error occurred while building the lookup keyIllegalArgumentException - if some parameters are nullpublic List<L> find(R value)
value - the right valueLookUpException - if error was occurred while looking up the valuesCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.