Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MINOR: Rename DecommissionBrokers to UnregisterBrokers #10084

Merged
merged 4 commits into from
Feb 10, 2021

Conversation

cmccabe
Copy link
Contributor

@cmccabe cmccabe commented Feb 8, 2021

Rename DecommissionBrokers to UnregisterBrokers. Fix an incorrect JavaDoc comment for the Admin API. Make sure that UNREGISTER_BROKER is marked as forwardable and not as a controller-only API (since it can received by brokers).

@cmccabe cmccabe added the kraft label Feb 8, 2021
*/
DecommissionBrokerResult decommissionBroker(int brokerId, DecommissionBrokerOptions options);
UnregisterBrokerResult unregisterBroker(int brokerId, UnregisterBrokerOptions options);
Copy link
Contributor

@ijuma ijuma Feb 9, 2021

Choose a reason for hiding this comment

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

@cmccabe We should mark all KIP-500 methods with @Unstable and mention it in the documentation too.

Copy link
Contributor

@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.

Thanks for the PR. A couple of comments below. Also, we should update the PR description to describe the other changes we include in the PR besides the rename.

* <p>
* This operation is supported only on self-managed Kafka clusters (i.e. brokers which do not rely on Zookeeper).
* This operation does not have any effect on partition assignments. It is supported
* only on Kafka clusters which use Raft to store metadata, rather than ZooKeeper.
*
* The following exceptions can be anticipated when calling {@code get()} on the future from the
* returned {@link DescribeFeaturesResult}:
Copy link
Contributor

Choose a reason for hiding this comment

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

"DescribeFeaturesResult" needs to be updated.

@@ -3390,6 +3390,11 @@ class KafkaApis(val requestChannel: RequestChannel,
new DescribeProducersResponse(response.setThrottleTimeMs(requestThrottleMs)))
}

def handleUnregisterBrokerRequest(request: RequestChannel.Request): Unit = {
throw new UnsupportedVersionException("The broker unregistration API is not available when using " +
"Apache ZooKeeper mode.")
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a bit confusing since this method can be called when the built-in quorum mode is used too. Or am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This method can't be called in built-in quorum mode since the API is forwardable and we will always have a forwarding manager

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a comment explaining that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will do

Copy link
Contributor

@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 after the comment is added and the PR description (and commit message) is updated.

@cmccabe cmccabe merged commit 06dce72 into apache:trunk Feb 10, 2021
cmccabe added a commit that referenced this pull request Feb 10, 2021
Rename DecommissionBrokers to UnregisterBrokers. Fix an incorrect JavaDoc comment
for the Admin API. Make sure that UNREGISTER_BROKER is marked as forwardable and
not as a controller-only API (since it can received by brokers).

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

* apache-github/trunk: (118 commits)
  KAFKA-12327: Remove MethodHandle usage in CompressionType (apache#10123)
KAFKA-12297: Make MockProducer return RecordMetadata with values as
per contract
  MINOR: Update zstd and use classes with no finalizers (apache#10120)
KAFKA-12326: Corrected regresion in MirrorMaker 2 executable
introduced with KAFKA-10021 (apache#10122)
KAFKA-12321 the comparison function for uuid type should be 'equals'
rather than '==' (apache#10098)
  MINOR: Add FetchSnapshot API doc in KafkaRaftClient (apache#10097)
  MINOR: KIP-631 KafkaConfig fixes and improvements (apache#10114)
  KAFKA-12272: Fix commit-interval metrics (apache#10102)
  MINOR: Improve confusing admin client shutdown logging (apache#10107)
  MINOR: Add BrokerMetadataListener (apache#10111)
  MINOR: Support Raft-based metadata quorums in system tests (apache#10093)
MINOR: add the MetaLogListener, LocalLogManager, and Controller
interface. (apache#10106)
  MINOR: Introduce the KIP-500 Broker lifecycle manager (apache#10095)
MINOR: Remove always-passing validation in
TestRecordTest#testProducerRecord (apache#9930)
KAFKA-5235: GetOffsetShell: Support for multiple topics and consumer
configuration override (KIP-635) (apache#9430)
MINOR: Prevent creating partition.metadata until ID can be written
(apache#10041)
  MINOR: Add RaftReplicaManager (apache#10069)
MINOR: Add ClientQuotaMetadataManager for processing QuotaRecord
(apache#10101)
  MINOR: Rename DecommissionBrokers to UnregisterBrokers (apache#10084)
MINOR: KafkaBroker.brokerState should be volatile instead of
AtomicReference (apache#10080)
  ...

clients/src/main/java/org/apache/kafka/common/record/CompressionType.java
core/src/test/scala/unit/kafka/coordinator/group/GroupMetadataManagerTest.scala
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants