[ 
https://issues.apache.org/jira/browse/STORM-643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14629090#comment-14629090
 ] 

ASF GitHub Bot commented on STORM-643:
--------------------------------------

GitHub user vesense opened a pull request:

    https://github.com/apache/storm/pull/635

    [STORM-643] KafkaUtils repeatedly fetches messages whose offset is out of 
range

    STORM-643 fixing for 0.9.x-branch

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/vesense/storm patch-2

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/storm/pull/635.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #635
    
----
commit 9221dba1eee59686ec6a1bcfd93d4ce542b071e9
Author: Xin Wang <[email protected]>
Date:   2015-07-16T02:06:28Z

    Fix incorrect WARN log

commit a6557a565429b2e12fc0659c6484fc50f90b5cd5
Author: Xin Wang <[email protected]>
Date:   2015-07-16T02:19:41Z

    Remove outdated failed offsets

----


> KafkaUtils repeatedly fetches messages whose offset is out of range
> -------------------------------------------------------------------
>
>                 Key: STORM-643
>                 URL: https://issues.apache.org/jira/browse/STORM-643
>             Project: Apache Storm
>          Issue Type: Bug
>          Components: storm-kafka
>    Affects Versions: 0.9.2-incubating, 0.9.3, 0.9.4, 0.9.5
>            Reporter: Xin Wang
>            Assignee: Xin Wang
>            Priority: Minor
>
> KafkaUtils repeat fetch messages which offset is out of range.
> This happened when failed list(SortedSet<Long> failed) is not empty and some 
> offset in it is OutOfRange.
> {code}
> [worker-log]
> 2015-02-01 10:24:27.231+0800 s.k.KafkaUtils [WARN] Got fetch request with 
> offset out of range: [20919071816]; retrying with default start offset time 
> from configuration. configured start offset time: [-2]
> 2015-02-01 10:24:27.232+0800 s.k.PartitionManager [WARN] Using new offset: 
> 20996130717
> 2015-02-01 10:24:27.333+0800 s.k.KafkaUtils [WARN] Got fetch request with 
> offset out of range: [20919071816]; retrying with default start offset time 
> from configuration. configured start offset time: [-2]
> 2015-02-01 10:24:27.334+0800 s.k.PartitionManager [WARN] Using new offset: 
> 20996130717
> ...
> {code}
> [FIX]
> {code}
> storm.kafka.PartitionManager.fill():
> ...
> try {
>       msgs = KafkaUtils.fetchMessages(_spoutConfig, _consumer, _partition, 
> offset);
> } catch (UpdateOffsetException e) {
>        _emittedToOffset = KafkaUtils.getOffset(_consumer, _spoutConfig.topic, 
> _partition.partition, _spoutConfig);
>       LOG.warn("Using new offset: {}", _emittedToOffset);
>       // fetch failed, so don't update the metrics
>       //fix bug: remove this offset from failed list when it is OutOfRange
>       if (had_failed) {
>               failed.remove(offset);
>       }
>             return;
> }
> ...
> {code}
> also: Log "retrying with default start offset time from configuration. 
> configured start offset time: [-2]" is incorrect.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to