tweise commented on a change in pull request #7679: [FLINK-11501][Kafka 
Connector] Add ratelimiting to Kafka consumer
URL: https://github.com/apache/flink/pull/7679#discussion_r257045352
 
 

 ##########
 File path: 
flink-connectors/flink-connector-kafka-0.9/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumer09.java
 ##########
 @@ -311,4 +323,19 @@ private static void setDeserializer(Properties props) {
                props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, 
deSerName);
                props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, 
deSerName);
        }
+
+
+       // 
------------------------------------------------------------------------
+       // Rate Limiter specific methods
+       // 
------------------------------------------------------------------------
+
+       /**
+        * Set a rate limiter to ratelimit bytes read from Kafka.
+        * @param kafkaRateLimiter
+        * @param maxBytesPerSecond
+        */
+       public void setRateLimiter(FlinkConnectorRateLimiter kafkaRateLimiter, 
long maxBytesPerSecond) {
 
 Review comment:
   Why the second parameter? That should be a setter on 
`DefaultKafkaRateLimiter`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to