Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-5837

ReassignPartitionsCommand fails if default throttle/timeout used

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.0.0
    • Component/s: admin
    • Labels:
      None

      Description

      System ReassignPartitionsTest.test_reassign_partitions failed with:

      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)

      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:

      val throttle = if (opts.options.has(opts.throttleOpt)) opts.options.valueOf(opts.throttleOpt) else -1

      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).

        Attachments

          Activity

            People

            • Assignee:
              rsivaram Rajini Sivaram
              Reporter:
              rsivaram Rajini Sivaram

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment