GitHub user benstopford opened a pull request:
https://github.com/apache/kafka/pull/1896
KAFKA-4200: Fix throttle argument in kafka-reassign-partitions.sh
Simple jira which alters two things:
1. kafka-reassign-partitions --verify prints Throttle was removed
regardless of whether a throttle was applied. It should only print this if the
value was actually changed.
2. --verify should exception if the âthrottle argument. (check generate
too)
To test this I extracted all validation logic into a separate method and
added a test which covers the majority of combinations. The validation logic
was retained as is, other than implementing (2) and adding validation to the
--broker-list option which you can currently apply to any of hte main actions
(where it is ignored). Requirement 1 was tested manually (as it's just
println).
Testing:
- Build passes locally.
- System test reassign_partitions_test.py also passes.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/benstopford/kafka KAFKA-4200
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/1896.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 #1896
commit f85efead9c468d5d6e906a5c11f573a36d620244
Author: Ben Stopford
Date: 2016-09-21T09:26:50Z
KAFKA-4200: kafka-reassign-partitions â-verify prints "Throttle was
removed" regardless of whether a throttle was applied. It should only print
this if the value was actually changed. Tested this maually ensuring the value
is not printed when we call verify whilst the rebalance is running, but does
print the value when running verify when the throttle completes. Rerunning
verify after the throttle completes also does not print the line.
commit 843c00c3cbee354fcfb1f0fdda5f77addd4b6eb4
Author: Ben Stopford
Date: 2016-09-21T12:15:37Z
KAFKA-4200: kafka-reassign-partitions â-verify prints "Throttle was
removed" regardless of whether a throttle was applied. It should only print
this if the value was actually changed. Tested this maually ensuring the value
is not printed when we call verify whilst the rebalance is running, but does
print the value when running verify when the throttle completes. Rerunning
verify after the throttle completes also does not print the line.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---