Skip to content

KAFKA-8405; Remove deprecated kafka-preferred-replica-election command#10443

Merged
dajac merged 4 commits intoapache:trunkfrom
dajac:KAFKA-8405
Mar 31, 2021
Merged

KAFKA-8405; Remove deprecated kafka-preferred-replica-election command#10443
dajac merged 4 commits intoapache:trunkfrom
dajac:KAFKA-8405

Conversation

@dajac
Copy link
Member

@dajac dajac commented Mar 30, 2021

The kafka-preferred-replica-election command was deprecated in 2.4. As we removed the related APIs in the Admin client (#10440), we can also remove the command line tool. kafka-leader-election can be used instead.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@dajac
Copy link
Member Author

dajac commented Mar 30, 2021

@ijuma What do you think about this one?

@ijuma
Copy link
Member

ijuma commented Mar 30, 2021

Good question. I think this script is more widely used since it has existed for a lot longer than the admin commands we have removed in #10440. One question: could the script just point to the new command? Are the commands different enough that it would not work?

@hachikuji
Copy link
Contributor

I'm somewhat more inclined to just get rid of it.

@chia7712
Copy link
Member

+1 to get rid of it. Could you update upgrade.html to include the replacement of kafka-preferred-replica-election?

@dajac
Copy link
Member Author

dajac commented Mar 31, 2021

Good question. I think this script is more widely used since it has existed for a lot longer than the admin commands we have removed in #10440. One question: could the script just point to the new command? Are the commands different enough that it would not work?

I just checked. It would still break current usages as the new script expect --election-type arg which is not in the old script. So existing users would have to adapt anyway. The semantic of --path-to-json-file is also slightly different in the two scripts. I think that this would be even more confusing for users.

@dajac
Copy link
Member Author

dajac commented Mar 31, 2021

I have updated the upgrade notes.

@ijuma
Copy link
Member

ijuma commented Mar 31, 2021

Thinking about it, people would have to adjust to using the script with bootstrap-server and that was introduced much later, so I'm fine with removing.

Copy link
Member

@ijuma ijuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks. One nit below.

<li>The deprecated <code>Admin.electedPreferredLeaders()</code> methods were removed. Please use <code>Admin.electLeaders</code> instead.</li>
<li>The deprecated <code>ConfigEntry</code> constructor was removed (<a href="https://issues.apache.org/jira/browse/KAFKA-12577">KAFKA-12577</a>).
Please use the remaining public constructor instead.</li>
<li>The deprecated <code>kafka-preferred-replica-election</code> command line tool was removed. Please use <code>kafka-leader-election</code> instead.</li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move this just above or below the related admin API removal.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@dajac
Copy link
Member Author

dajac commented Mar 31, 2021

Failed tests are not related. Merging it to trunk.

@dajac dajac merged commit 6d7a901 into apache:trunk Mar 31, 2021
@dajac dajac deleted the KAFKA-8405 branch March 31, 2021 18:45
Terrdi pushed a commit to Terrdi/kafka that referenced this pull request Apr 1, 2021
…and (apache#10443)

The `kafka-preferred-replica-election` command was deprecated in 2.4. This path removes it for 3.0. `kafka-leader-election` can be used instead.

Reviewers: Ismael Juma <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>, Jason Gustafson <jason@confluent.io>
ijuma added a commit to ijuma/kafka that referenced this pull request Apr 4, 2021
…e-allocations-lz4

* apache-github/trunk: (243 commits)
  KAFKA-12590: Remove deprecated kafka.security.auth.Authorizer, SimpleAclAuthorizer and related classes in 3.0 (apache#10450)
  KAFKA-3968: fsync the parent directory of a segment file when the file is created (apache#10405)
  KAFKA-12283: disable flaky testMultipleWorkersRejoining to stabilize build (apache#10408)
  MINOR: remove KTable.to from the docs (apache#10464)
  MONOR: Remove redudant LocalLogManager (apache#10325)
  MINOR: support ImplicitLinkedHashCollection#sort (apache#10456)
  KAFKA-12587 Remove KafkaPrincipal#fromString for 3.0 (apache#10447)
  KAFKA-12426: Missing logic to create partition.metadata files in RaftReplicaManager (apache#10282)
  MINOR: Improve reproducability of raft simulation tests (apache#10422)
  KAFKA-12474: Handle failure to write new session keys gracefully (apache#10396)
  KAFKA-12593: Fix Apache License headers (apache#10452)
  MINOR: Fix typo in MirrorMaker v2 documentation (apache#10433)
  KAFKA-12600: Remove deprecated config value `default` for client config `client.dns.lookup` (apache#10458)
  KAFKA-12952: Remove deprecated LogConfig.Compact (apache#10451)
  Initial commit (apache#10454)
  KAFKA-12575: Eliminate Log.isLogDirOffline boolean attribute (apache#10430)
  KAFKA-8405; Remove deprecated `kafka-preferred-replica-election` command (apache#10443)
  MINOR: Fix docs for end-to-end record latency metrics (apache#10449)
  MINOR Replaced File with Path in LogSegmentData. (apache#10424)
  KAFKA-12583: Upgrade netty to 4.1.62.Final
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants