You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/03/11 21:12:04 UTC

[jira] [Commented] (SAMZA-1136) If latest offset <= 0 then SystemStreamMetadata is incorrect

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

ASF GitHub Bot commented on SAMZA-1136:
---------------------------------------

GitHub user logarithm opened a pull request:

    https://github.com/apache/samza/pull/83

    SAMZA-1136: If latest offset <= 0 then SystemStreamMetadata is incorrect

    Debug log says "Setting oldest offset to 0 to consume from beginning", but actually current code just adds element to immutable map but do nothing with the result of addition.
    ```scala
    oldestOffsets.get(topicAndPartition) match {
      case Some(s) =>
        oldestOffsets.updated(topicAndPartition, "0")
      case None =>
        oldestOffsets.put(topicAndPartition, "0")
    }
    ```

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

    $ git pull https://github.com/metamx/samza oldest-offsets

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

    https://github.com/apache/samza/pull/83.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 #83
    
----
commit 529bf1974ab8e85cf2a57850fe51dc484c973fa6
Author: Maksim Logvinenko <ml...@gmail.com>
Date:   2017-03-11T21:03:58Z

    Set "0" for oldest offsets if current offset <= 0

----


> If latest offset <= 0 then SystemStreamMetadata is incorrect
> ------------------------------------------------------------
>
>                 Key: SAMZA-1136
>                 URL: https://issues.apache.org/jira/browse/SAMZA-1136
>             Project: Samza
>          Issue Type: Bug
>            Reporter: Maksim Logvinenko
>
> Debug log says "Setting oldest offset to 0 to consume from beginning", but actually current code just adds element to immutable map but do nothing with the result of addition.
> {code}
> oldestOffsets.get(topicAndPartition) match {
>   case Some(s) =>
>     oldestOffsets.updated(topicAndPartition, "0")
>   case None =>
>     oldestOffsets.put(topicAndPartition, "0")
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)