[
https://issues.apache.org/jira/browse/STORM-1455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15133728#comment-15133728
]
ASF GitHub Bot commented on STORM-1455:
---------------------------------------
Github user abhishekagarwal87 commented on the pull request:
https://github.com/apache/storm/pull/1026#issuecomment-180214818
Thanks @HeartSaVioR
> kafka spout should not reset to the beginning of partition when
> offsetoutofrange exception occurs
> -------------------------------------------------------------------------------------------------
>
> Key: STORM-1455
> URL: https://issues.apache.org/jira/browse/STORM-1455
> Project: Apache Storm
> Issue Type: Bug
> Components: storm-kafka
> Affects Versions: 1.0.0
> Reporter: Abhishek Agarwal
> Assignee: Abhishek Agarwal
> Fix For: 1.0.0
>
>
> https://github.com/apache/storm/blob/master/external/storm-kafka/src/jvm/storm/kafka/PartitionManager.java#L190
> {noformat}
> try {
> msgs = KafkaUtils.fetchMessages(_spoutConfig, _consumer,
> _partition, offset);
> } catch (TopicOffsetOutOfRangeException e) {
> _emittedToOffset = KafkaUtils.getOffset(_consumer,
> _partition.topic, _partition.partition,
> kafka.api.OffsetRequest.EarliestTime());
> LOG.warn("{} Using new offset: {}", _partition.partition,
> _emittedToOffset);
> {noformat}
> If there was one old offset out of range, partition manager will re-send all
> the offsets from EarliestTime to _emittedOffset.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)