Caroline McKee
09/06/2023, 7:27 PM-9223372036854775808 , meaning non of my timers in my process function are working. I have 5 events coming exactly every 16 to 17 ms (the 5 events have the same timestamp, but this should be fine with a monotonous timestamp strategy?) and the auto watermark interval to be 50ms, so as I understand it, the watermark should be updated by the 4th ish event, but it's not. The timestmaps seem fine though. I've seen other people have this issue, but none of the aforementioned fixes seem to be working (ex. set parallelism to 1). This is my watermark generator:
class MyTimestampAssigner(TimestampAssigner):
def extract_timestamp(self, value, record_timestamp):
time = int(dateparser.parse(value[0]).timestamp() * 1000)
return time
watermark_strategy = WatermarkStrategy.for_monotonous_timestamps().with_timestamp_assigner(MyTimestampAssigner())Joe Karayusuf
09/06/2023, 7:34 PMenv.getConfig.setAutoWatermarkInterval(TimeUnit.SECONDS.toMillis(10))
2. Are all sub tasks receiving data? If some of the partitions aren't receiving data, the event timestamp won't advance. This can be resolved by calling withIdlenss on the watermark strategy. i.e. WatermarkStrategy.for_monotonous_timestamps().with_idleness(100)Caroline McKee
09/06/2023, 7:37 PMJoe Karayusuf
09/06/2023, 7:41 PMCaroline McKee
09/06/2023, 8:06 PMself.env.set_parallelism(1)
loc_stream = input_streams.get("com_feed_topic")
watermark_strategy = WatermarkStrategy.for_monotonous_timestamps().with_timestamp_assigner(MyTimestampAssigner())
processed_loc_stream = loc_stream.flat_map(LocationMapper(),
output_type=Types.TUPLE([Types.STRING(),
Types.BASIC_ARRAY(Types.FLOAT()),
<http://Types.INT|Types.INT>(),
Types.BOOLEAN()])) \
.assign_timestamps_and_watermarks(watermark_strategy)Caroline McKee
09/06/2023, 8:09 PM"2023-06-13T00:39:06.073Z"
"2023-06-13T00:39:06.073Z"
"2023-06-13T00:39:06.073Z"
"2023-06-13T00:39:06.073Z"
"2023-06-13T00:39:06.073Z"
"2023-06-13T00:39:06.089Z"
"2023-06-13T00:39:06.089Z"
"2023-06-13T00:39:06.089Z"
"2023-06-13T00:39:06.089Z"
"2023-06-13T00:39:06.089Z"
"2023-06-13T00:39:06.106Z"
"2023-06-13T00:39:06.106Z"
"2023-06-13T00:39:06.106Z"
"2023-06-13T00:39:06.106Z"
"2023-06-13T00:39:06.106Z" ...