sjvanrossum opened a new issue, #37449:
URL: https://github.com/apache/beam/issues/37449

   ### What happened?
   
   #34659 introduced a "fail fast" feature that appears to have broken 
KafkaIO's SDF.
   
   [KafkaIO.java 
L1924-1939](https://github.com/apache/beam/pull/34659/changes#diff-ee81e93a5689a74087a1451bfaac1ef921b0b0254830b9e5450a0a5b6cf2c227R1924-R1939)
 (`GenerateKafkaSourceDescriptor`):
   ```java
                   List<PartitionInfo> partitionInfoList = 
consumer.partitionsFor(topic);
                   if (logTopicVerification == null || !logTopicVerification) {
                     checkState(
                         partitionInfoList != null && 
!partitionInfoList.isEmpty(),
                         "Could not find any partitions info for topic "
                             + topic
                             + ". Please check Kafka configuration and make 
sure "
                             + "that provided topics exist.");
                   } else {
                     LOG.warn(
                         "Could not find any partitions info for topic {}. 
Please check Kafka configuration "
                             + "and make sure that the provided topics exist.",
                         topic);
                   }
   
                   for (PartitionInfo p : partitionInfoList) {
   ```
   
   [WatchForKafkaTopicPartitions.java 
L193-200](https://github.com/apache/beam/pull/34659/changes#diff-e4fd9f93693baa7651221dd25ba9694175ecd27646ebd0ffb778b81f6ee282ceR193-R200):
   ```java
             List<PartitionInfo> partitionInfoList = 
kafkaConsumer.partitionsFor(topic);
             checkState(
                 partitionInfoList != null && !partitionInfoList.isEmpty(),
                 "Could not find any partitions info for topic "
                     + topic
                     + ". Please check Kafka configuration and make sure "
                     + "that provided topics exist.");
             for (PartitionInfo partition : partitionInfoList) {
   ```
   
   This will throw `IllegalStateException` from those DoFns and result in 
retrying instead of stopping. I think logging the condition should suffice for 
`GenerateKafkaSourceDescriptor` and `WatchForKafkaTopicPartitions`.
   
   ### Issue Priority
   
   Priority: 2 (default / most bugs should be filed as P2)
   
   ### Issue Components
   
   - [ ] Component: Python SDK
   - [ ] Component: Java SDK
   - [ ] Component: Go SDK
   - [ ] Component: Typescript SDK
   - [ ] Component: IO connector
   - [ ] Component: Beam YAML
   - [ ] Component: Beam examples
   - [ ] Component: Beam playground
   - [ ] Component: Beam katas
   - [ ] Component: Website
   - [ ] Component: Infrastructure
   - [ ] Component: Spark Runner
   - [ ] Component: Flink Runner
   - [ ] Component: Samza Runner
   - [ ] Component: Twister2 Runner
   - [ ] Component: Hazelcast Jet Runner
   - [ ] Component: Google Cloud Dataflow Runner


-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to