From d6d1d48a2f36ceb65be9a598b141baad18760489 Mon Sep 17 00:00:00 2001 From: "Robert (Bobby) Evans" Date: Wed, 7 Feb 2018 14:37:42 -0600 Subject: [PATCH] STORM-2941: Fix checkstyle issues in KafkaSpout --- .../java/org/apache/storm/kafka/spout/KafkaSpout.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/KafkaSpout.java b/external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/KafkaSpout.java index 9d133a7ea45..abd677409d8 100644 --- a/external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/KafkaSpout.java +++ b/external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/KafkaSpout.java @@ -233,7 +233,9 @@ private long doSeek(TopicPartition newTp, OffsetAndMetadata committedOffset) { if (committedOffset != null) { // offset was previously committed for this consumer group and topic-partition, either by this or another topology. - if (commitMetadataManager.isOffsetCommittedByThisTopology(newTp, committedOffset, Collections.unmodifiableMap(offsetManagers))) { + if (commitMetadataManager.isOffsetCommittedByThisTopology(newTp, + committedOffset, + Collections.unmodifiableMap(offsetManagers))) { // Another KafkaSpout instance (of this topology) already committed, therefore FirstPollOffsetStrategy does not apply. kafkaConsumer.seek(newTp, committedOffset.offset()); } else { @@ -440,7 +442,9 @@ private boolean emitOrRetryTuple(ConsumerRecord record) { if (isAtLeastOnceProcessing() && committedOffset != null && committedOffset.offset() > record.offset() - && commitMetadataManager.isOffsetCommittedByThisTopology(tp, committedOffset, Collections.unmodifiableMap(offsetManagers))) { + && commitMetadataManager.isOffsetCommittedByThisTopology(tp, + committedOffset, + Collections.unmodifiableMap(offsetManagers))) { // Ensures that after a topology with this id is started, the consumer fetch // position never falls behind the committed offset (STORM-2844) throw new IllegalStateException("Attempting to emit a message that has already been committed."