In a single task within the stream app, does the following two methods run independently (meaning while the method "process" is handling an incoming message from the upstream source, the method "punctuate" can also run in parallel based on the specified schedule and WALL_CLOCK_TIME as the PunctuationType?) OR do they share same thread so it's either one that runs at a given time, if so would the punctuate method never gets invoked if the process method keeps continuously getting messages from the upstream source?
Processor.process(K key, V value)
Process the record with the given key and value.ProcessorContext.schedule(long interval, PunctuationType type, Punctuator callback)
Schedules a periodic operation for processors.
Also, please clarify what does it mean by partition id value being -1 in punctuate method. Is punctuate method not specific to any partition?
- int ProcessorContext.partition()
Returns the partition id of the current input record; could be -1 if it is not available (for example, if this method is invoked from the punctuate call)