In python you can (easily) wrap the shell commands for that function
https://kafka.apache.org/documentation.html#basic_ops_modify_topic

import subprocess
subprocess.Popen(["/opt/apache/kafka/bin/kafka-topcs.sh","--alter",....

and parse the response from it

/*******************************************
 Joe Stein
 Founder, Principal Consultant
 Big Data Open Source Security LLC
 http://www.stealth.ly
 Twitter: @allthingshadoop <http://www.twitter.com/allthingshadoop>
********************************************/

On Fri, Oct 24, 2014 at 4:04 PM, David Charle <dbchar2...@gmail.com> wrote:

> Thanks joe.
>
> Wondering if there are any hacks for time being until that gets folded ?
> like creating a child zk under partitions, etc ?
>
> On Fri, Oct 24, 2014 at 12:59 PM, Joe Stein <joe.st...@stealth.ly> wrote:
>
> > Hey David, that would be something I think we should support with moving
> > administrative functions into the broker and accessed over new Admin
> > Request/Response wire protocol calls.  There are a few steps though I
> think
> > first in doing that.  One is
> > https://issues.apache.org/jira/browse/KAFKA-1694 so we can wrap around
> all
> > of our tools in one place (after that I think moving them to the broker
> > would be feasible). I still late on updating that ticket with a few
> > discussions from the mailing list and more design (hopefully this weekend
> > but likely early next week).  I have a note to create a sub ticket (or
> > such) for the admin request/response changes too.
> >
> > /*******************************************
> >  Joe Stein
> >  Founder, Principal Consultant
> >  Big Data Open Source Security LLC
> >  http://www.stealth.ly
> >  Twitter: @allthingshadoop <http://www.twitter.com/allthingshadoop>
> > ********************************************/
> >
> > On Fri, Oct 24, 2014 at 2:41 PM, David Charle <dbchar2...@gmail.com>
> > wrote:
> >
> > > hi kafka'ers
> > >
> > > I couldn't find anything useful where I could add partitions through an
> > API
> > > using python or simple calls to kafka/zookeeper without writing my own
> > > java/scala code.
> > >
> > > In another way, is there a python/REST way to do what create-topics
> alter
> > > functionality does to change partitions ?
> > >
> > > Thanks in advance
> > >
> > > --
> > > David
> > >
> >
>
>
>
> --
> --
> David
>

Reply via email to