Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-1947

can't explicitly set replica-assignment when add partitions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.8.1.1
    • 0.9.0.0
    • core
    • None
    • Windows

    Description

      When create topic, the replicaAssignmentOpt should not appear with partitions.
      But when add partitions, they should can appear together, from the code below, you can see when alter topic, and has partitions in arguments, it try get "replica-assignment"
      https://git1-us-west.apache.org/repos/asf?p=kafka.git;a=blob;f=core/src/main/scala/kafka/admin/TopicCommand.scala;h=285c0333ff43543d3e46444c1cd9374bb883bb59;hb=HEAD#l114

      The root cause is below code:
      CommandLineUtils.checkInvalidArgs(parser, options, replicaAssignmentOpt,
      305 allTopicLevelOpts – Set(alterOpt, createOpt) + partitionsOpt + replicationFactorOpt)

      https://git1-us-west.apache.org/repos/asf?p=kafka.git;a=blob;f=core/src/main/scala/kafka/admin/TopicCommand.scala;h=285c0333ff43543d3e46444c1cd9374bb883bb59;hb=HEAD#l304

      Related:
      https://issues.apache.org/jira/browse/KAFKA-1052

      Attachments

        1. KAFKA-1947.patch
          1 kB
          Honghai Chen

        Issue Links

          Activity

            People

              waldenchen Honghai Chen
              waldenchen Honghai Chen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: