Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 507D5200D0C for ; Tue, 5 Sep 2017 18:00:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4F1DB16098B; Tue, 5 Sep 2017 16:00:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9D2D31609BB for ; Tue, 5 Sep 2017 18:00:08 +0200 (CEST) Received: (qmail 70309 invoked by uid 500); 5 Sep 2017 16:00:06 -0000 Mailing-List: contact jira-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@kafka.apache.org Delivered-To: mailing list jira@kafka.apache.org Received: (qmail 70298 invoked by uid 99); 5 Sep 2017 16:00:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Sep 2017 16:00:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 3B772182CC8 for ; Tue, 5 Sep 2017 16:00:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.201 X-Spam-Level: X-Spam-Status: No, score=-99.201 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id R1jusruxayWR for ; Tue, 5 Sep 2017 16:00:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 23FFA5FD48 for ; Tue, 5 Sep 2017 16:00:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id AADDCE00DF for ; Tue, 5 Sep 2017 16:00:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 5FB4D24137 for ; Tue, 5 Sep 2017 16:00:00 +0000 (UTC) Date: Tue, 5 Sep 2017 16:00:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: jira@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-5837) ReassignPartitionsCommand fails if default throttle/timeout used MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 05 Sep 2017 16:00:09 -0000 [ 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 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)