kezhuw commented on pull request #15397:
URL: https://github.com/apache/flink/pull/15397#issuecomment-809576928


   @StephanEwen Thanks for inspiring reviewing. I think it is true that only 
`TopicPartition` but not `KafkaPartitionSplit` is must in enumerator's state. 
Double-bookkeeping  is always a headache, thus a good to avoid even in single 
class for sake of readability and future maintenance.
   
   I guess we should also enhance docs somewhere to emphasize not bookkeeping 
(readerId, split) relationship in enumerator's state. I noticed that 
[pulsar-flink](https://github.com/streamnative/pulsar-flink/blob/master/pulsar-flink-connector/src/main/java/org/apache/flink/connector/pulsar/source/enumerator/PulsarSourceEnumeratorState.java#L22)
 maintains a similar split assignments. In the end, I think `KafkaSource` 
itself could provides as a nice example for other similar sources. @PatrickRen  
@becketqin 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to