Class AdaptiveJoinOperatorFactory<OUT>
java.lang.Object
org.apache.flink.streaming.api.operators.AbstractStreamOperatorFactory<OUT>
org.apache.flink.table.runtime.operators.join.adaptive.AdaptiveJoinOperatorFactory<OUT>
- Type Parameters:
OUT- The output type of the operator
- All Implemented Interfaces:
Serializable,org.apache.flink.streaming.api.operators.StreamOperatorFactory<OUT>,org.apache.flink.streaming.runtime.tasks.ProcessingTimeServiceAware,AdaptiveJoin
@Internal
public class AdaptiveJoinOperatorFactory<OUT>
extends org.apache.flink.streaming.api.operators.AbstractStreamOperatorFactory<OUT>
implements AdaptiveJoin
Adaptive join factory.
Note: This class will hold an AdaptiveJoin and serve as a proxy class to provide an
interface externally. Due to runtime access visibility constraints with the table-planner module,
the AdaptiveJoin object will be serialized during the Table Planner phase and will only
be lazily deserialized before the dynamic generation of the JobGraph.
- See Also:
-
Field Summary
Fields inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperatorFactory
chainingStrategy, processingTimeService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends org.apache.flink.streaming.api.operators.StreamOperator<OUT>>
TcreateStreamOperator(org.apache.flink.streaming.api.operators.StreamOperatorParameters<OUT> parameters) org.apache.flink.streaming.api.operators.StreamOperatorFactory<?>genOperatorFactory(ClassLoader classLoader, org.apache.flink.configuration.ReadableConfig config) Generates a StreamOperatorFactory for this join operator using the provided ClassLoader and config.Get the join type of the join operator.Class<? extends org.apache.flink.streaming.api.operators.StreamOperator>getStreamOperatorClass(ClassLoader classLoader) voidmarkAsBroadcastJoin(boolean canBeBroadcast, boolean leftIsBuild) Determine whether the adaptive join operator can be optimized as broadcast hash join and decide which input side is the build side or a smaller side.booleanCheck if the adaptive join node needs to adjust the read order of the input sides.Methods inherited from class org.apache.flink.streaming.api.operators.AbstractStreamOperatorFactory
getChainingStrategy, getMailboxExecutor, setChainingStrategy, setMailboxExecutor, setProcessingTimeServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.streaming.api.operators.StreamOperatorFactory
getOperatorAttributes, isInputTypeConfigurable, isLegacySource, isOutputTypeConfigurable, isStreamSource, setInputType, setOutputType
-
Constructor Details
-
AdaptiveJoinOperatorFactory
public AdaptiveJoinOperatorFactory(byte[] adaptiveJoinSerialized)
-
-
Method Details
-
genOperatorFactory
public org.apache.flink.streaming.api.operators.StreamOperatorFactory<?> genOperatorFactory(ClassLoader classLoader, org.apache.flink.configuration.ReadableConfig config) Description copied from interface:AdaptiveJoinGenerates a StreamOperatorFactory for this join operator using the provided ClassLoader and config.- Specified by:
genOperatorFactoryin interfaceAdaptiveJoin- Parameters:
classLoader- the ClassLoader to be used for loading classes.config- the configuration to be applied for creating the operator factory.- Returns:
- a StreamOperatorFactory instance.
-
getJoinType
Description copied from interface:AdaptiveJoinGet the join type of the join operator.- Specified by:
getJoinTypein interfaceAdaptiveJoin- Returns:
- the join type.
-
markAsBroadcastJoin
public void markAsBroadcastJoin(boolean canBeBroadcast, boolean leftIsBuild) Description copied from interface:AdaptiveJoinDetermine whether the adaptive join operator can be optimized as broadcast hash join and decide which input side is the build side or a smaller side.- Specified by:
markAsBroadcastJoinin interfaceAdaptiveJoin- Parameters:
canBeBroadcast- whether the join operator can be optimized to broadcast hash join.leftIsBuild- whether the left input side is the build side.
-
shouldReorderInputs
public boolean shouldReorderInputs()Description copied from interface:AdaptiveJoinCheck if the adaptive join node needs to adjust the read order of the input sides. For the hash join operator, it is necessary to ensure that the build side is read first.- Specified by:
shouldReorderInputsin interfaceAdaptiveJoin- Returns:
- whether the inputs should be reordered.
-
createStreamOperator
public <T extends org.apache.flink.streaming.api.operators.StreamOperator<OUT>> T createStreamOperator(org.apache.flink.streaming.api.operators.StreamOperatorParameters<OUT> parameters) - Specified by:
createStreamOperatorin interfaceorg.apache.flink.streaming.api.operators.StreamOperatorFactory<OUT>
-
getStreamOperatorClass
public Class<? extends org.apache.flink.streaming.api.operators.StreamOperator> getStreamOperatorClass(ClassLoader classLoader) - Specified by:
getStreamOperatorClassin interfaceorg.apache.flink.streaming.api.operators.StreamOperatorFactory<OUT>
-