srdo commented on a change in pull request #3164: STORM-3529: Catch and Log
Kafka RetriableException
URL: https://github.com/apache/storm/pull/3164#discussion_r344486625
##########
File path:
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/metrics/KafkaOffsetMetric.java
##########
@@ -76,8 +77,17 @@ public Object getValueAndReset() {
Map<String,TopicMetrics> topicMetricsMap = new HashMap<>();
Set<TopicPartition> topicPartitions = offsetManagers.keySet();
- Map<TopicPartition, Long> beginningOffsets =
consumer.beginningOffsets(topicPartitions);
- Map<TopicPartition, Long> endOffsets =
consumer.endOffsets(topicPartitions);
+ Map<TopicPartition, Long> beginningOffsets;
+ Map<TopicPartition, Long> endOffsets;
+
+ try {
+ beginningOffsets = consumer.beginningOffsets(topicPartitions);
+ endOffsets = consumer.endOffsets(topicPartitions);
+ } catch (RetriableException e) {
+ LOG.error("Failed to get offsets from Kafka", e);
Review comment:
Consider lowering to WARN level, and write that we will retry on next
metrics tick. I think this is only a concern if it is recurring, so error level
seems a little strong.
----------------------------------------------------------------
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