kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-5837) ReassignPartitionsCommand fails if default throttle/timeout used
Date Tue, 05 Sep 2017 16:00:00 GMT

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

ASF GitHub Bot commented on KAFKA-5837:
---------------------------------------

GitHub user rajinisivaram opened a pull request:

    https://github.com/apache/kafka/pull/3792

    KAFKA-5837: Set defaults for ReassignPartitionsCommand correctly

    

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

    $ git pull https://github.com/rajinisivaram/kafka KAFKA-5837

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

    https://github.com/apache/kafka/pull/3792.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 #3792
    
----
commit ea852fc052bcb1bcabde249a315c006e7ef16d27
Author: Rajini Sivaram <rajinisivaram@googlemail.com>
Date:   2017-09-05T15:51:32Z

    KAFKA-5837: Set defaults for ReassignPartitionsCommand correctly

----


> ReassignPartitionsCommand fails if default throttle/timeout used
> ----------------------------------------------------------------
>
>                 Key: KAFKA-5837
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5837
>             Project: Kafka
>          Issue Type: Bug
>          Components: admin
>    Affects Versions: 1.0.0
>            Reporter: Rajini Sivaram
>            Assignee: Rajini Sivaram
>             Fix For: 1.0.0
>
>
> System ReassignPartitionsTest.test_reassign_partitions failed with:
> {quote}
> Partitions reassignment failed due to java.lang.String cannot be cast to java.lang.Long
> java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long
>   at scala.runtime.BoxesRunTime.unboxToLong(BoxesRunTime.java:105)
>   at kafka.admin.ReassignPartitionsCommand$.executeAssignment(ReassignPartitionsCommand.scala:188)
>   at kafka.admin.ReassignPartitionsCommand$.main(ReassignPartitionsCommand.scala:61)
>   at kafka.admin.ReassignPartitionsCommand.main(ReassignPartitionsCommand.scala)
> {quote}
> This is because default throttle is being set as a String rather than a Long. Default
throttle was never being set properly in the command opts, but it didn't matter earlier because
code used to set it explicitly:
> {quote}
> val throttle = if (opts.options.has(opts.throttleOpt)) opts.options.valueOf(opts.throttleOpt)
else -1
> {quote}
> But the commit https://github.com/apache/kafka/commit/adefc8ea076354e07839f0319fee1fba52343b91
started using the default directly (and also added a timeout with default set in the same
way).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message