class_docstr: The Flink Kinesis Consumer is an exactly-once parallel streaming data source that subscribes to
  multiple AWS Kinesis streams within the same AWS service region, and can handle resharding of
  streams. Each subtask of the consumer is responsible for fetching data records from multiple
  Kinesis shards. The number of shards fetched by each subtask will change as shards are closed
  and created by Kinesis.
  
  To leverage Flink's checkpointing mechanics for exactly-once streaming processing guarantees,
  the Flink Kinesis consumer is implemented with the AWS Java SDK, instead of the officially
  recommended AWS Kinesis Client Library, for low-level control on the management of stream state.
  The Flink Kinesis Connector also supports setting the initial starting points of Kinesis
  streams, namely TRIM_HORIZON and LATEST.
  
  Kinesis and the Flink consumer support dynamic re-sharding and shard IDs, while sequential,
  cannot be assumed to be consecutive. There is no perfect generic default assignment function.
  Default shard to subtask assignment, which is based on hash code, may result in skew, with some
  subtasks having many shards assigned and others none.
  
  It is recommended to monitor the shard distribution and adjust assignment appropriately.
  A custom assigner implementation can be set via setShardAssigner(KinesisShardAssigner) to
  optimize the hash function or use static overrides to limit skew.
  
  In order for the consumer to emit watermarks, a timestamp assigner needs to be set via
  setPeriodicWatermarkAssigner(AssignerWithPeriodicWatermarks) and the auto watermark emit
  interval configured via ExecutionConfig.setAutoWatermarkInterval(long).
  
  Watermarks can only advance when all shards of a subtask continuously deliver records.
  To avoid an inactive or closed shard to block the watermark progress, the idle timeout should
  be configured via configuration property ConsumerConfigConstants.SHARD_IDLE_INTERVAL_MILLIS.
  By default, shards won't be considered idle and watermark calculation will wait for newer
  records to arrive from all shards.
  
  Note that re-sharding of the Kinesis stream while an application (that relies on the Kinesis
  records for watermarking) is running can lead to incorrect late events. This depends on how
  shards are assigned to subtasks and applies regardless of whether watermarks are generated in
  the source or a downstream operator.
class_docstr_tok: ["The","Flink","Kinesis","Consumer","is","an","exactly-once","parallel","streaming","data","source","that","subscribes","to","multiple","AWS","Kinesis","streams","within","the","same","AWS","service","region",",","and","can","handle","resharding","of","streams",".","Each","subtask","of","the","consumer","is","responsible","for","fetching","data","records","from","multiple","Kinesis","shards",".","The","number","of","shards","fetched","by","each","subtask","will","change","as","shards","are","closed","and","created","by","Kinesis",".","To","leverage","Flink","'s","checkpointing","mechanics","for","exactly-once","streaming","processing","guarantees",",","the","Flink","Kinesis","consumer","is","implemented","with","the","AWS","Java","SDK",",","instead","of","the","officially","recommended","AWS","Kinesis","Client","Library",",","for","low-level","control","on","the","management","of","stream","state",".","The","Flink","Kinesis","Connector","also","supports","setting","the","initial","starting","points","of","Kinesis","streams",",","namely","TRIM_HORIZON","and","LATEST",".","Kinesis","and","the","Flink","consumer","support","dynamic","re-sharding","and","shard","IDs",",","while","sequential",",","can","not","be","assumed","to","be","consecutive",".","There","is","no","perfect","generic","default","assignment","function",".","Default","shard","to","subtask","assignment",",","which","is","based","on","hash","code",",","may","result","in","skew",",","with","some","subtasks","having","many","shards","assigned","and","others","none",".","It","is","recommended","to","monitor","the","shard","distribution","and","adjust","assignment","appropriately",".","A","custom","assigner","implementation","can","be","set","via","setShardAssigner","(","KinesisShardAssigner",")","to","optimize","the","hash","function","or","use","static","overrides","to","limit","skew",".","In","order","for","the","consumer","to","emit","watermarks",",","a","timestamp","assigner","needs","to","be","set","via","setPeriodicWatermarkAssigner","(","AssignerWithPeriodicWatermarks",")","and","the","auto","watermark","emit","interval","configured","via","ExecutionConfig.setAutoWatermarkInterval","(","long",")",".","Watermarks","can","only","advance","when","all","shards","of","a","subtask","continuously","deliver","records",".","To","avoid","an","inactive","or","closed","shard","to","block","the","watermark","progress",",","the","idle","timeout","should","be","configured","via","configuration","property","ConsumerConfigConstants.SHARD_IDLE_INTERVAL_MILLIS",".","By","default",",","shards","wo","n't","be","considered","idle","and","watermark","calculation","will","wait","for","newer","records","to","arrive","from","all","shards",".","Note","that","re-sharding","of","the","Kinesis","stream","while","an","application","(","that","relies","on","the","Kinesis","records","for","watermarking",")","is","running","can","lead","to","incorrect","late","events",".","This","depends","on","how","shards","are","assigned","to","subtasks","and","applies","regardless","of","whether","watermarks","are","generated","in","the","source","or","a","downstream","operator","."]
docstr: Set the global watermark tracker. When set, it will be used by the fetcher to align the
  shard consumers by event time.
docstr_tok: ["Set","the","global","watermark","tracker",".","When","set",",","it","will","be","used","by","the","fetcher","to","align","the","shard","consumers","by","event","time","."]
code: def set_watermark_tracker(
      self, watermark_tracker: WatermarkTracker
  ) -> "FlinkKinesisConsumer":
      """
      Set the global watermark tracker. When set, it will be used by the fetcher to align the
      shard consumers by event time.
      """
      self._j_kinesis_consumer.setWatermarkTracker(
          watermark_tracker._j_watermark_tracker
      )
      return self
  
imports: from typing import Dict, Union, List
  from pyflink.common import SerializationSchema, DeserializationSchema, AssignerWithPeriodicWatermarksWrapper
  from pyflink.datastream.functions import SourceFunction
  from pyflink.datastream.connectors import Sink
  from pyflink.java_gateway import get_gateway
label_desc: Use image node_id 4 for calling the FlinkKinesisConsumer obj's underlying member method code with example usage: obj.set_watermark_tracker(watermark_tracker) and returns: self