> On May 26, 2015, 7:08 a.m., Michael Noll wrote:
> > core/src/main/scala/kafka/admin/ReassignPartitionsCommand.scala, line 81
> > <https://reviews.apache.org/r/34641/diff/1/?file=971195#file971195line81>
> >
> >     Should we also consider reassignments that are in-progress as "errors"?
> >     
> >     The reasoning is that you'd like to do the following in (say) Ansible: 
> > "Trigger reassignment of partitions, wait until all are completed, and only 
> > then continue with the next action."
> >     
> >     That being said, there are other ways to achieve this in tools like 
> > Ansible.  For instance, you can trigger reassignents, then repeatedly call 
> > `--verify` in a loop and capture its STDOUT, looking for "is still in 
> > progress" and "failed".  However, this is arguably more error prone because 
> > the log messages can change between Kafka versions (and oftentimes such 
> > changes are not prominently advertised, so you only notice this once your 
> > deployment script breaks).
> 
> Manikumar Reddy O wrote:
>     Yes, we can consider in-progress as "errors". Other option could be 
> returning a different error code. Let us wait for others suggestions/concerns.
> 
> Gwen Shapira wrote:
>     I wouldn't consider in-progress as error, since in-progress is pretty 
> much the expected behavior here (reassigning takes a while and the tool exits 
> immediately).
>     As you mentioned, the ansible script should include triggering 
> re-assignment and then polling periodically until its completed. (like you 
> would for HDFS rebalance, Oozie job, MR job, etc)
>     
>     Perhaps just commenting on --verify output that this is a public API and 
> should never change would be ok?
> 
> Gwen Shapira wrote:
>     Sorry, I got confused. You meant - triggering a new re-assignment while 
> the old one is still in progress. I agree this should be an error.
>     (but I still think the ansible script should use --verify, otherwise you 
> risk triggering a new re-assignment accidentally)

difeerent exitCode is given for in-progress reassignments.

exitCode = 0 for ReassignmentCompleted
exitCode = 1 for ReassignmentInProgress
exitCode = 2 for ReassignmentFailed


- Manikumar Reddy


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/34641/#review85154
-----------------------------------------------------------


On July 14, 2015, 10:03 a.m., Manikumar Reddy O wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34641/
> -----------------------------------------------------------
> 
> (Updated July 14, 2015, 10:03 a.m.)
> 
> 
> Review request for kafka.
> 
> 
> Bugs: KAFKA-2214
>     https://issues.apache.org/jira/browse/KAFKA-2214
> 
> 
> Repository: kafka
> 
> 
> Description
> -------
> 
> Addressing Gwen's comments
> 
> 
> Diffs
> -----
> 
>   core/src/main/scala/kafka/admin/ReassignPartitionsCommand.scala 
> ea345895a52977c25bff57e95e12b8662331d7fe 
> 
> Diff: https://reviews.apache.org/r/34641/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Manikumar Reddy O
> 
>

Reply via email to