public abstract class UDJ extends Object
User Defined Join need to inherit this class to implement a UDJ, override join method
| Constructor and Description |
|---|
UDJ() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close()
Interface for operations upon udj exit, implementation can be no-op
|
abstract void |
join(Record key,
Iterator<Record> left,
Iterator<Record> right,
Yieldable<Record> output)
Interface for setting up the udj, implementation can be a no-op
|
abstract void |
setup(ExecutionContext ctx,
DataAttributes attributes)
Interface for setting up the udj, implementation can be a no-op
|
public abstract void setup(ExecutionContext ctx, DataAttributes attributes)
ctx: - the ExecutionContext which contains context information that may be useful
for setting up user code execution environmentattributes: - encapsulate any attributes needed for join operation, such as parameters described by k-v pairspublic abstract void join(Record key, Iterator<Record> left, Iterator<Record> right, Yieldable<Record> output)
key: - join keyleft: - left input records, if map join hint is used (on smaller table), left input will correspond to the
table on which the map join hint is applied: i.e., left input corresponds to smaller table in that caseright: - right input records, in the case of map join, right input would provide the streaming input from
the larger table that likely would not fit into memory as a wholeoutput: - interaface for producing output from the joining operationpublic abstract void close()
Copyright © 2021 Alibaba Cloud Computing. All rights reserved.