use of org.apache.samza.operators.functions.PartialJoinFunction in project samza by apache.
the class OperatorImplGraph method getOrCreatePartialJoinOpImpls.
private PartialJoinOperatorImpl getOrCreatePartialJoinOpImpls(JoinOperatorSpec joinOpSpec, boolean isLeft, Clock clock) {
// get the per task pair of PartialJoinOperatorImpl for the corresponding {@code joinOpSpec}
KV<PartialJoinOperatorImpl, PartialJoinOperatorImpl> partialJoinOpImpls = joinOpImpls.computeIfAbsent(joinOpSpec.getOpId(), joinOpId -> {
PartialJoinFunction leftJoinFn = createLeftJoinFn(joinOpSpec);
PartialJoinFunction rightJoinFn = createRightJoinFn(joinOpSpec);
return new KV(new PartialJoinOperatorImpl(joinOpSpec, true, leftJoinFn, rightJoinFn, clock), new PartialJoinOperatorImpl(joinOpSpec, false, rightJoinFn, leftJoinFn, clock));
});
if (isLeft) {
// we got here from the left side of the join
return partialJoinOpImpls.getKey();
} else {
// we got here from the right side of the join
return partialJoinOpImpls.getValue();
}
}
Aggregations