You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jun Rao (JIRA)" <ji...@apache.org> on 2011/08/09 20:05:29 UTC

[jira] [Created] (KAFKA-89) consumer should initialize to a valid offset

consumer should initialize to a valid offset
--------------------------------------------

                 Key: KAFKA-89
                 URL: https://issues.apache.org/jira/browse/KAFKA-89
             Project: Kafka
          Issue Type: Improvement
          Components: core
            Reporter: Jun Rao


Currently, when a consumer starts up for the very first time, the server will log kafka.common.OffsetOutOfRangeException. To avoid that, the consumer should pick up a valid offset if offset is not available in ZK.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (KAFKA-89) consumer should initialize to a valid offset

Posted by "Jun Rao (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-89?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jun Rao updated KAFKA-89:
-------------------------

       Resolution: Fixed
    Fix Version/s: 0.7
         Assignee: Jun Rao
           Status: Resolved  (was: Patch Available)
    
> consumer should initialize to a valid offset
> --------------------------------------------
>
>                 Key: KAFKA-89
>                 URL: https://issues.apache.org/jira/browse/KAFKA-89
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.7
>            Reporter: Jun Rao
>            Assignee: Jun Rao
>             Fix For: 0.7
>
>         Attachments: KAFKA-89.v1.patch, KAFKA-89.v2.patch, KAFKA-89.v3.patch
>
>
> Currently, when a consumer starts up for the very first time, the server will log kafka.common.OffsetOutOfRangeException. To avoid that, the consumer should pick up a valid offset if offset is not available in ZK.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (KAFKA-89) consumer should initialize to a valid offset

Posted by "Jun Rao (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-89?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jun Rao updated KAFKA-89:
-------------------------

    Attachment: KAFKA-89.v2.patch

Good catch. Uploaded v2 patch.
                
> consumer should initialize to a valid offset
> --------------------------------------------
>
>                 Key: KAFKA-89
>                 URL: https://issues.apache.org/jira/browse/KAFKA-89
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.7
>            Reporter: Jun Rao
>         Attachments: KAFKA-89.v1.patch, KAFKA-89.v2.patch
>
>
> Currently, when a consumer starts up for the very first time, the server will log kafka.common.OffsetOutOfRangeException. To avoid that, the consumer should pick up a valid offset if offset is not available in ZK.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KAFKA-89) consumer should initialize to a valid offset

Posted by "Neha Narkhede (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13122193#comment-13122193 ] 

Neha Narkhede commented on KAFKA-89:
------------------------------------

+1. 
                
> consumer should initialize to a valid offset
> --------------------------------------------
>
>                 Key: KAFKA-89
>                 URL: https://issues.apache.org/jira/browse/KAFKA-89
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.7
>            Reporter: Jun Rao
>         Attachments: KAFKA-89.v1.patch, KAFKA-89.v2.patch, KAFKA-89.v3.patch
>
>
> Currently, when a consumer starts up for the very first time, the server will log kafka.common.OffsetOutOfRangeException. To avoid that, the consumer should pick up a valid offset if offset is not available in ZK.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (KAFKA-89) consumer should initialize to a valid offset

Posted by "Jun Rao (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-89?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jun Rao updated KAFKA-89:
-------------------------

    Attachment: KAFKA-89.v3.patch

Attached v3. Fixed variable name and message in the exception.
                
> consumer should initialize to a valid offset
> --------------------------------------------
>
>                 Key: KAFKA-89
>                 URL: https://issues.apache.org/jira/browse/KAFKA-89
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.7
>            Reporter: Jun Rao
>         Attachments: KAFKA-89.v1.patch, KAFKA-89.v2.patch, KAFKA-89.v3.patch
>
>
> Currently, when a consumer starts up for the very first time, the server will log kafka.common.OffsetOutOfRangeException. To avoid that, the consumer should pick up a valid offset if offset is not available in ZK.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KAFKA-89) consumer should initialize to a valid offset

Posted by "Neha Narkhede (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13122172#comment-13122172 ] 

Neha Narkhede commented on KAFKA-89:
------------------------------------

Also, in the function earliestOrLatestOffset, the variable still says latestOffset. Can you rename it to say earliestOrLatestOffset ?
                
> consumer should initialize to a valid offset
> --------------------------------------------
>
>                 Key: KAFKA-89
>                 URL: https://issues.apache.org/jira/browse/KAFKA-89
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.7
>            Reporter: Jun Rao
>         Attachments: KAFKA-89.v1.patch, KAFKA-89.v2.patch
>
>
> Currently, when a consumer starts up for the very first time, the server will log kafka.common.OffsetOutOfRangeException. To avoid that, the consumer should pick up a valid offset if offset is not available in ZK.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KAFKA-89) consumer should initialize to a valid offset

Posted by "Joel Koshy (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13122189#comment-13122189 ] 

Joel Koshy commented on KAFKA-89:
---------------------------------

+1

Looks great.
                
> consumer should initialize to a valid offset
> --------------------------------------------
>
>                 Key: KAFKA-89
>                 URL: https://issues.apache.org/jira/browse/KAFKA-89
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.7
>            Reporter: Jun Rao
>         Attachments: KAFKA-89.v1.patch, KAFKA-89.v2.patch, KAFKA-89.v3.patch
>
>
> Currently, when a consumer starts up for the very first time, the server will log kafka.common.OffsetOutOfRangeException. To avoid that, the consumer should pick up a valid offset if offset is not available in ZK.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (KAFKA-89) consumer should initialize to a valid offset

Posted by "Jun Rao (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-89?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jun Rao updated KAFKA-89:
-------------------------

    Attachment: KAFKA-89.v1.patch
    
> consumer should initialize to a valid offset
> --------------------------------------------
>
>                 Key: KAFKA-89
>                 URL: https://issues.apache.org/jira/browse/KAFKA-89
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.7
>            Reporter: Jun Rao
>         Attachments: KAFKA-89.v1.patch
>
>
> Currently, when a consumer starts up for the very first time, the server will log kafka.common.OffsetOutOfRangeException. To avoid that, the consumer should pick up a valid offset if offset is not available in ZK.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (KAFKA-89) consumer should initialize to a valid offset

Posted by "Jun Rao (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/KAFKA-89?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jun Rao updated KAFKA-89:
-------------------------

    Affects Version/s: 0.7
               Status: Patch Available  (was: Open)

Patch available for review.
                
> consumer should initialize to a valid offset
> --------------------------------------------
>
>                 Key: KAFKA-89
>                 URL: https://issues.apache.org/jira/browse/KAFKA-89
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.7
>            Reporter: Jun Rao
>         Attachments: KAFKA-89.v1.patch
>
>
> Currently, when a consumer starts up for the very first time, the server will log kafka.common.OffsetOutOfRangeException. To avoid that, the consumer should pick up a valid offset if offset is not available in ZK.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (KAFKA-89) consumer should initialize to a valid offset

Posted by "Joel Koshy (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/KAFKA-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13122141#comment-13122141 ] 

Joel Koshy commented on KAFKA-89:
---------------------------------

The second case should be OffsetRequest.Latest

Also, the latestOffset val in getEarliestOrLatestOffset would be better renamed to earliestOrLatestOffset.
                
> consumer should initialize to a valid offset
> --------------------------------------------
>
>                 Key: KAFKA-89
>                 URL: https://issues.apache.org/jira/browse/KAFKA-89
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.7
>            Reporter: Jun Rao
>         Attachments: KAFKA-89.v1.patch
>
>
> Currently, when a consumer starts up for the very first time, the server will log kafka.common.OffsetOutOfRangeException. To avoid that, the consumer should pick up a valid offset if offset is not available in ZK.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira