nwangtw commented on a change in pull request #3275: Bugfix kafka spout
URL: https://github.com/apache/incubator-heron/pull/3275#discussion_r287118961
##########
File path:
contrib/spouts/kafka/java/heron-kafka-spout-parent/heron-kafka-spout/src/main/java/org/apache/heron/spouts/kafka/KafkaSpout.java
##########
@@ -330,11 +355,8 @@ private void manualCommit(TopicPartition topicPartition,
NavigableMap<Long, Long
private Iterable<ConsumerRecord<K, V>> poll() {
ConsumerRecords<K, V> records = consumer.poll(Duration.ofMillis(200));
if (!records.isEmpty()) {
- //since the Kafka Consumer metrics are built gradually based on the
partitions it consumes,
- //we need to periodically check whether there's any new metrics to
register after
- //each polling.
if (System.currentTimeMillis() - previousKafkaMetricsUpdatedTimestamp
- > metricsIntervalInSecs) {
+ > metricsIntervalInSecs * 1000) {
Review comment:
why "* 1000"?
----------------------------------------------------------------
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]
With regards,
Apache Git Services