Class UniformShardAssigner
- java.lang.Object
-
- org.apache.flink.connector.kinesis.source.enumerator.assigner.UniformShardAssigner
-
- All Implemented Interfaces:
Serializable,KinesisShardAssigner
@Internal public class UniformShardAssigner extends Object implements KinesisShardAssigner
An implementation of theKinesisShardAssignerthat assigns splits uniformly.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.connector.kinesis.source.enumerator.KinesisShardAssigner
KinesisShardAssigner.Context
-
-
Constructor Summary
Constructors Constructor Description UniformShardAssigner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intassign(KinesisShardSplit split, KinesisShardAssigner.Context context)Controls the assignment of a given split to a specific subtask.
-
-
-
Method Detail
-
assign
public int assign(KinesisShardSplit split, KinesisShardAssigner.Context context)
Description copied from interface:KinesisShardAssignerControls the assignment of a given split to a specific subtask. TheKinesisShardAssigner.Contextobject provides immutable information for the current status of the Flink cluster (e.g. number of registered readers, current split assignments).- Specified by:
assignin interfaceKinesisShardAssigner- Parameters:
split- the split to assigncontext- immutable information about the Flink cluster- Returns:
- subtaskId to assign given split
-
-