It's not public API so it may not be stable between releases, but you could
try using the ReassignPartitionsCommand class directly. Or, you can see
that the code in that class is a very simple use of ZkUtils, so you could
just make the necessary calls to ZkUtils directly.

In the future, when KIP-4 (
https://cwiki.apache.org/confluence/display/KAFKA/KIP-4+-+Command+line+and+centralized+administrative+operations)
is implemented, we'll have public, supported APIs for these types of
commands.


On Wed, Aug 5, 2015 at 7:41 PM, tao xiao <xiaotao...@gmail.com> wrote:

> Hi,
>
> I have a requirement that needs to call partition reassignment inside Java
> code. At the current implementation of ReassignPartitionsCommand it expects
> a json file to be passed in. Other than generating a json file and save it
> somewhere in my code what are other options that I can invoke the command
> like passing a json string directly?
>



-- 
Thanks,
Ewen

Reply via email to