psharma-openai commented on code in PR #28512:
URL: https://github.com/apache/flink/pull/28512#discussion_r3456020264


##########
flink-python/pyflink/datastream/connectors/dynamic_kafka.py:
##########
@@ -50,13 +97,30 @@ class 
SingleClusterTopicMetadataService(KafkaMetadataService):
     A KafkaMetadataService backed by a single Kafka cluster where stream ids 
map to topics.
     """
 
-    def __init__(self, kafka_cluster_id: str, properties: Dict[str, str]):
+    def __init__(self, kafka_cluster_id: str, properties: Dict[str, str],
+                 starting_offsets_initializer: 
Optional[KafkaOffsetsInitializer] = None,
+                 stopping_offsets_initializer: 
Optional[KafkaOffsetsInitializer] = None):
+        """
+        :param kafka_cluster_id: The ID of the Kafka cluster.
+        :param properties: The properties to access the cluster.
+        :param starting_offsets_initializer: Optional starting offsets 
initializer for this cluster.
+        :param stopping_offsets_initializer: Optional stopping offsets 
initializer for this cluster.
+        """
         gateway = get_gateway()
         j_properties = gateway.jvm.java.util.Properties()
         for key, value in properties.items():
             j_properties.setProperty(key, value)
-        j_service = 
gateway.jvm.org.apache.flink.connector.kafka.dynamic.metadata \
-            .SingleClusterTopicMetadataService(kafka_cluster_id, j_properties)
+
+        j_metadata_service = 
gateway.jvm.org.apache.flink.connector.kafka.dynamic.metadata \

Review Comment:
   ooc: is this a common pattern in python just looks a bit weird. 



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