kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: Partition reassignment data file is empty
Date Mon, 01 Jan 2018 14:51:28 GMT
I logged KAFKA-6413 for improving error message
w.r.t. ReassignPartitionsCommand#parsePartitionReassignmentData()

FYI

On Sun, Dec 31, 2017 at 10:24 PM, allen chan <allen.michael.chan@gmail.com>
wrote:

> Absolutely user error. Works after i removed the erroneous comma. Wish the
> error message was more obvious.
> Thanks Brett and Ted!
>
> On Sun, Dec 31, 2017 at 6:29 PM, Ted Yu <yuzhihong@gmail.com> wrote:
>
> > I verified that Brett said thru this code:
> >
> >     val (partitionsToBeReassigned, replicaAssignment) =
> > ReassignPartitionsCommand.parsePartitionReassignmentData(
> >
> >         "{\"version\":1,\"partitions\":[{\"topic\":\"metrics\",\"
> > partition\"
> > :0,\"replicas\":[1,2]},{\"topic\":\"metrics\",\"
> partition\":1,\"replicas\"
> > :[2,3]},]}");
> >
> >
> > partitionsToBeReassigned was empty.
> >
> > I think parsePartitionReassignmentData() should be improved to give
> better
> > error information.
> >
> >
> > FYI
> >
> > On Sun, Dec 31, 2017 at 4:51 PM, Brett Rann <brann@zendesk.com.invalid>
> > wrote:
> >
> > > That's happening because your JSON is malformed. Losing the last comma
> > will
> > > fix it.
> > >
> > > On Sun, Dec 31, 2017 at 3:43 PM, allen chan <
> > allen.michael.chan@gmail.com>
> > > wrote:
> > >
> > > > Hello
> > > >
> > > > Kafka Version: 0.11.0.1
> > > >
> > > > I am trying to increase replication factor for a topic and i am
> getting
> > > the
> > > > below error. Can anyone help explain what the error means? The json
> is
> > > not
> > > > empty
> > > >
> > > > $ cat increase-replication-factor.json
> > > > {"version":1,
> > > >   "partitions":[
> > > >      {"topic":"metrics","partition":0,"replicas":[1,2]},
> > > >      {"topic":"metrics","partition":1,"replicas":[2,3]},
> > > > ]}
> > > >
> > > > $ sudo /opt/kafka/kafka_2.12-0.11.0.1/bin/kafka-reassign-
> partitions.sh
> > > > --zookeeper server1:2181 --reassignment-json-file
> > > > increase-replication-factor.json --execute
> > > > Partitions reassignment failed due to Partition reassignment data
> file
> > is
> > > > empty
> > > > kafka.common.AdminCommandFailedException: Partition reassignment
> data
> > > file
> > > > is empty
> > > > at
> > > > kafka.admin.ReassignPartitionsCommand$.parseAndValidate(
> > > > ReassignPartitionsCommand.scala:188)
> > > > at
> > > > kafka.admin.ReassignPartitionsCommand$.executeAssignment(
> > > > ReassignPartitionsCommand.scala:158)
> > > > at
> > > > kafka.admin.ReassignPartitionsCommand$.executeAssignment(
> > > > ReassignPartitionsCommand.scala:154)
> > > > at
> > > > kafka.admin.ReassignPartitionsCommand$.main(
> ReassignPartitionsCommand.
> > > > scala:51)
> > > > at
> > > > kafka.admin.ReassignPartitionsCommand.main(
> ReassignPartitionsCommand.
> > > > scala)
> > > >
> > > > Thanks
> > > > --
> > > > Allen Michael Chan
> > > >
> > >
> > >
> > >
> > > --
> > >
> > > Brett Rann
> > >
> > > Senior DevOps Engineer
> > >
> > >
> > > Zendesk International Ltd
> > >
> > > 395 Collins Street, Melbourne VIC 3000 Australia
> > >
> > > Mobile: +61 (0) 418 826 017
> > >
> >
>
>
>
> --
> Allen Michael Chan
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message