You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by "Lung, Paul" <pl...@ebay.com> on 2014/05/07 21:44:35 UTC

How To Use kafka-topics.sh To Move Replica To Different Broker

Hi Guys,

I’m using Kafka 0.8.1, and I’m having difficulty trying to move a replica from one broker to another.

Doing a "kafka-topics.sh —describe | grep mini__078____active_80__32__mini" shows:


Topic:mini__078____active_80__32__mini PartitionCount:1 ReplicationFactor:3 Configs:retention.bytes=104857600

Topic: mini__078____active_80__32__mini Partition: 0 Leader: 73979 Replicas: 73979,0,44416 Isr: 73979,44416,0


I’m trying to move one replica off the “0” broker, and on to another broker like so:


"./kafka-topics.sh --alter --topic mini__078____active_80__32__mini --replica-assignment 73979:73066:44416”


However, after an hour, I still see one of the replicas on the “0” broker. The replica doesn’t seem to move at all. I’ve tried this command with:


"./kafka-topics.sh --alter --topic mini__078____active_80__32__mini --replica-assignment 73979,73066,44416”


But the result is the same. Please help.


Paul Lung

Re: How To Use kafka-topics.sh To Move Replica To Different Broker

Posted by Neha Narkhede <ne...@gmail.com>.
You cannot use the kafka-topics tool to move replicas to other brokers. To
learn how to move replicas, please see the "Custom partition assignment and
migration" section
here<http://kafka.apache.org/081/documentation.html#basic_ops_cluster_expansion>
.

Hope that helps! If not, please let us know, we are interested in improving
the quality of our documentation.

Thanks,
Neha


On Wed, May 7, 2014 at 12:44 PM, Lung, Paul <pl...@ebay.com> wrote:

> Hi Guys,
>
> I’m using Kafka 0.8.1, and I’m having difficulty trying to move a replica
> from one broker to another.
>
> Doing a "kafka-topics.sh —describe | grep
> mini__078____active_80__32__mini" shows:
>
>
> Topic:mini__078____active_80__32__mini PartitionCount:1
> ReplicationFactor:3 Configs:retention.bytes=104857600
>
> Topic: mini__078____active_80__32__mini Partition: 0 Leader: 73979
> Replicas: 73979,0,44416 Isr: 73979,44416,0
>
>
> I’m trying to move one replica off the “0” broker, and on to another
> broker like so:
>
>
> "./kafka-topics.sh --alter --topic mini__078____active_80__32__mini
> --replica-assignment 73979:73066:44416”
>
>
> However, after an hour, I still see one of the replicas on the “0” broker.
> The replica doesn’t seem to move at all. I’ve tried this command with:
>
>
> "./kafka-topics.sh --alter --topic mini__078____active_80__32__mini
> --replica-assignment 73979,73066,44416”
>
>
> But the result is the same. Please help.
>
>
> Paul Lung
>

Re: How To Use kafka-topics.sh To Move Replica To Different Broker

Posted by Guozhang Wang <wa...@gmail.com>.
Hi Paul,

kafka-topics.sh is not used for moving replicas to different brokers, what
you are looking for is the partition-reassignment tool in

bin/kafka-reassign-partitions.sh


Guozhang


On Wed, May 7, 2014 at 12:44 PM, Lung, Paul <pl...@ebay.com> wrote:

> Hi Guys,
>
> I’m using Kafka 0.8.1, and I’m having difficulty trying to move a replica
> from one broker to another.
>
> Doing a "kafka-topics.sh —describe | grep
> mini__078____active_80__32__mini" shows:
>
>
> Topic:mini__078____active_80__32__mini PartitionCount:1
> ReplicationFactor:3 Configs:retention.bytes=104857600
>
> Topic: mini__078____active_80__32__mini Partition: 0 Leader: 73979
> Replicas: 73979,0,44416 Isr: 73979,44416,0
>
>
> I’m trying to move one replica off the “0” broker, and on to another
> broker like so:
>
>
> "./kafka-topics.sh --alter --topic mini__078____active_80__32__mini
> --replica-assignment 73979:73066:44416”
>
>
> However, after an hour, I still see one of the replicas on the “0” broker.
> The replica doesn’t seem to move at all. I’ve tried this command with:
>
>
> "./kafka-topics.sh --alter --topic mini__078____active_80__32__mini
> --replica-assignment 73979,73066,44416”
>
>
> But the result is the same. Please help.
>
>
> Paul Lung
>



-- 
-- Guozhang

Re: How To Use kafka-topics.sh To Move Replica To Different Broker

Posted by Jun Rao <ju...@gmail.com>.
You need to use kafka-reassign-partitions.sh to do this. See
http://kafka.apache.org/documentation.html#basic_ops_cluster_expansion

Thanks,

Jun


On Wed, May 7, 2014 at 12:44 PM, Lung, Paul <pl...@ebay.com> wrote:

> Hi Guys,
>
> I’m using Kafka 0.8.1, and I’m having difficulty trying to move a replica
> from one broker to another.
>
> Doing a "kafka-topics.sh —describe | grep
> mini__078____active_80__32__mini" shows:
>
>
> Topic:mini__078____active_80__32__mini PartitionCount:1
> ReplicationFactor:3 Configs:retention.bytes=104857600
>
> Topic: mini__078____active_80__32__mini Partition: 0 Leader: 73979
> Replicas: 73979,0,44416 Isr: 73979,44416,0
>
>
> I’m trying to move one replica off the “0” broker, and on to another
> broker like so:
>
>
> "./kafka-topics.sh --alter --topic mini__078____active_80__32__mini
> --replica-assignment 73979:73066:44416”
>
>
> However, after an hour, I still see one of the replicas on the “0” broker.
> The replica doesn’t seem to move at all. I’ve tried this command with:
>
>
> "./kafka-topics.sh --alter --topic mini__078____active_80__32__mini
> --replica-assignment 73979,73066,44416”
>
>
> But the result is the same. Please help.
>
>
> Paul Lung
>