2023-04-18 05:52:28 +08:00
|
|
|
<!DOCTYPE import-control PUBLIC
|
|
|
|
"-//Puppy Crawl//DTD Import Control 1.1//EN"
|
|
|
|
"http://www.puppycrawl.com/dtds/import_control_1_1.dtd">
|
|
|
|
<!--
|
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
(the "License"); you may not use this file except in compliance with
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
|
|
|
|
|
|
|
<import-control pkg="org.apache.kafka">
|
|
|
|
|
|
|
|
<!-- THINK HARD ABOUT THE LAYERING OF THE PROJECT BEFORE CHANGING THIS FILE -->
|
|
|
|
|
|
|
|
<!-- common library dependencies -->
|
|
|
|
<allow pkg="java" />
|
|
|
|
<allow pkg="javax.management" />
|
|
|
|
<allow pkg="org.slf4j" />
|
|
|
|
<allow pkg="org.junit" />
|
|
|
|
<allow pkg="org.hamcrest" />
|
|
|
|
<allow pkg="org.mockito" />
|
|
|
|
<allow pkg="java.security" />
|
|
|
|
<allow pkg="javax.net.ssl" />
|
|
|
|
<allow pkg="javax.security" />
|
|
|
|
<allow pkg="net.jqwik.api" />
|
|
|
|
|
|
|
|
<!-- no one depends on the server -->
|
|
|
|
<disallow pkg="kafka" />
|
|
|
|
|
|
|
|
<!-- anyone can use public classes -->
|
|
|
|
<allow pkg="org.apache.kafka.common" exact-match="true" />
|
|
|
|
<allow pkg="org.apache.kafka.common.security" />
|
|
|
|
<allow pkg="org.apache.kafka.common.serialization" />
|
|
|
|
<allow pkg="org.apache.kafka.common.utils" />
|
|
|
|
<allow pkg="org.apache.kafka.common.errors" exact-match="true" />
|
|
|
|
<allow pkg="org.apache.kafka.common.memory" />
|
2025-01-24 22:03:43 +08:00
|
|
|
<allow pkg="org.apache.kafka.common.test.api" />
|
2023-04-18 05:52:28 +08:00
|
|
|
|
|
|
|
<!-- persistent collection factories/non-library-specific wrappers -->
|
|
|
|
<allow pkg="org.apache.kafka.server.immutable" exact-match="true" />
|
|
|
|
|
|
|
|
<subpackage name="queue">
|
|
|
|
<allow pkg="org.apache.kafka.test" />
|
|
|
|
</subpackage>
|
|
|
|
|
2023-11-29 01:42:21 +08:00
|
|
|
<subpackage name="metadata">
|
|
|
|
<allow pkg="org.apache.kafka.common.message" />
|
|
|
|
<allow pkg="org.apache.kafka.server.common" />
|
|
|
|
<allow pkg="org.apache.kafka.common.protocol" />
|
|
|
|
</subpackage>
|
|
|
|
|
2024-01-31 02:08:50 +08:00
|
|
|
<subpackage name="security">
|
|
|
|
<allow pkg="org.apache.kafka.common.config" />
|
|
|
|
<allow pkg="org.apache.kafka.common.config.types" />
|
|
|
|
<allow pkg="org.apache.kafka.server.util" />
|
|
|
|
<allow pkg="javax.crypto" />
|
|
|
|
<allow pkg="javax.crypto.spec" />
|
|
|
|
</subpackage>
|
|
|
|
|
2023-04-18 05:52:28 +08:00
|
|
|
<subpackage name="server">
|
|
|
|
<allow pkg="org.apache.kafka.common" />
|
|
|
|
<allow pkg="joptsimple" />
|
|
|
|
|
|
|
|
<subpackage name="common">
|
|
|
|
<allow pkg="org.apache.kafka.server.common" />
|
2024-10-31 02:40:47 +08:00
|
|
|
<allow pkg="org.apache.kafka.clients" />
|
2023-04-18 05:52:28 +08:00
|
|
|
</subpackage>
|
|
|
|
|
|
|
|
<subpackage name="immutable">
|
|
|
|
<allow pkg="org.apache.kafka.server.util"/>
|
|
|
|
<!-- only the factory package can use persistent collection library-specific wrapper implementations -->
|
|
|
|
<!-- the library-specific wrapper implementation for PCollections -->
|
|
|
|
<allow pkg="org.apache.kafka.server.immutable.pcollections" />
|
|
|
|
<subpackage name="pcollections">
|
|
|
|
<allow pkg="org.pcollections" />
|
|
|
|
</subpackage>
|
|
|
|
</subpackage>
|
|
|
|
|
|
|
|
<subpackage name="metrics">
|
|
|
|
<allow pkg="com.yammer.metrics" />
|
|
|
|
</subpackage>
|
KAFKA-15060: fix the ApiVersionManager interface
This PR expands the scope of ApiVersionManager a bit to include returning the current
MetadataVersion and features that are in effect. This is useful in general because that information
needs to be returned in an ApiVersionsResponse. It also allows us to fix the ApiVersionManager
interface so that all subclasses implement all methods of the interface. Having subclasses that
don't implement some methods is dangerous because they could cause exceptions at runtime in
unexpected scenarios.
On the KRaft controller, we were previously performing a read operation in the QuorumController
thread to get the current metadata version and features. With this PR, we now read a volatile
variable maintained by a separate MetadataVersionContextPublisher object. This will improve
performance and simplify the code. It should not change the guarantees we are providing; in both
the old and new scenarios, we need to be robust against version skew scenarios during updates.
Add a Features class which just has a 3-tuple of metadata version, features, and feature epoch.
Remove MetadataCache.FinalizedFeaturesAndEpoch, since it just duplicates the Features class.
(There are some additional feature-related classes that can be consolidated in in a follow-on PR.)
Create a java class, EndpointReadyFutures, for managing the futures associated with individual
authorizer endpoints. This avoids code duplication between ControllerServer and BrokerServer and
makes this code unit-testable.
Reviewers: David Arthur <mumrah@gmail.com>, dengziming <dengziming1993@gmail.com>, Luke Chen <showuon@gmail.com>
2023-06-08 04:11:55 +08:00
|
|
|
|
|
|
|
<subpackage name="network">
|
|
|
|
<allow pkg="org.apache.kafka.server.authorizer" />
|
|
|
|
</subpackage>
|
2023-06-20 22:50:46 +08:00
|
|
|
|
2024-11-08 16:55:09 +08:00
|
|
|
<subpackage name="purgatory">
|
|
|
|
<allow pkg="org.apache.kafka.server.metrics" />
|
|
|
|
<allow pkg="org.apache.kafka.server.util" />
|
2025-04-03 00:06:27 +08:00
|
|
|
<allow pkg="com.yammer.metrics.core" />
|
2024-11-08 16:55:09 +08:00
|
|
|
</subpackage>
|
|
|
|
|
2025-01-16 16:14:25 +08:00
|
|
|
<subpackage name="share">
|
|
|
|
<allow pkg="org.apache.kafka.server.share" />
|
|
|
|
<subpackage name="persister">
|
|
|
|
<allow pkg="org.apache.kafka.clients" />
|
|
|
|
<allow pkg="org.apache.kafka.server.util" />
|
|
|
|
<allow pkg="org.apache.kafka.test" />
|
|
|
|
</subpackage>
|
|
|
|
</subpackage>
|
|
|
|
|
2023-06-20 22:50:46 +08:00
|
|
|
<subpackage name="util">
|
2023-07-06 20:56:05 +08:00
|
|
|
<!-- InterBrokerSendThread uses some clients classes that are not part of the public -->
|
|
|
|
<!-- API but are still relatively common -->
|
KAFKA-15466: Add KIP-919 support for some admin APIs (#14399)
Add support for --bootstrap-controller in the following command-line tools:
- kafka-cluster.sh
- kafka-configs.sh
- kafka-features.sh
- kafka-metadata-quorum.sh
To implement this, the following AdminClient APIs now support the new bootstrap.controllers
configuration:
- Admin.alterConfigs
- Admin.describeCluster
- Admin.describeConfigs
- Admin.describeFeatures
- Admin.describeMetadataQuorum
- Admin.incrementalAlterConfigs
- Admin.updateFeatures
Command-line tool changes:
- Add CommandLineUtils.initializeBootstrapProperties to handle parsing --bootstrap-controller
in addition to --bootstrap-server.
- Add --bootstrap-controller to ConfigCommand.scala, ClusterTool.java, FeatureCommand.java, and
MetadataQuorumCommand.java.
KafkaAdminClient changes:
- Add the AdminBootstrapAddresses class to handle extracting bootstrap.servers or
bootstrap.controllers from the config map for KafkaAdminClient.
- In AdminMetadataManager, store the new usingBootstrapControllers boolean. Generalize
authException to encompass the concept of fatal exceptions in general. (For example, the
fatal exception where we talked to the wrong node type.) Treat
MismatchedEndpointTypeException and UnsupportedEndpointTypeException as fatal exceptions.
- Extend NodeProvider to include information about whether bootstrap.controllers is supported.
- Modify the APIs described above to support bootstrap.controllers.
Server-side changes:
- Support DescribeConfigsRequest on kcontrollers.
- Add KRaftMetadataCache to the kcontroller to simplify implemeting describeConfigs (and
probably more APIs in the future). It's mainly a wrapper around MetadataImage, so there is
essentially no extra resource consumption.
- Split RuntimeLoggerManager out of ConfigAdminManager to handle the incrementalAlterConfigs
support for BROKER_LOGGER. This is now supported on kcontrollers as well as brokers.
- Fix bug in AuthHelper.computeDescribeClusterResponse that resulted in us always sending back
BROKER as the endpoint type, even on the kcontroller.
Miscellaneous:
- Fix a few places in exceptions and log messages where we wrote "broker" instead of "node".
For example, an exception in NodeApiVersions.java, and a log message in NetworkClient.java.
- Fix the slf4j log prefix used by KafkaRequestHandler logging so that request handlers on a
controller don't look like they're on a broker.
- Make the FinalizedVersionRange constructor public for the sake of a junit test.
- Add unit and integration tests for the above.
Reviewers: David Arthur <mumrah@gmail.com>, Doguscan Namal <namal.doguscan@gmail.com>
2023-09-27 05:43:42 +08:00
|
|
|
<allow class="org.apache.kafka.clients.admin.AdminClientConfig" />
|
2023-06-20 22:50:46 +08:00
|
|
|
<allow class="org.apache.kafka.clients.ClientRequest" />
|
|
|
|
<allow class="org.apache.kafka.clients.ClientResponse" />
|
|
|
|
<allow class="org.apache.kafka.clients.KafkaClient" />
|
|
|
|
<allow class="org.apache.kafka.clients.RequestCompletionHandler" />
|
KAFKA-15466: Add KIP-919 support for some admin APIs (#14399)
Add support for --bootstrap-controller in the following command-line tools:
- kafka-cluster.sh
- kafka-configs.sh
- kafka-features.sh
- kafka-metadata-quorum.sh
To implement this, the following AdminClient APIs now support the new bootstrap.controllers
configuration:
- Admin.alterConfigs
- Admin.describeCluster
- Admin.describeConfigs
- Admin.describeFeatures
- Admin.describeMetadataQuorum
- Admin.incrementalAlterConfigs
- Admin.updateFeatures
Command-line tool changes:
- Add CommandLineUtils.initializeBootstrapProperties to handle parsing --bootstrap-controller
in addition to --bootstrap-server.
- Add --bootstrap-controller to ConfigCommand.scala, ClusterTool.java, FeatureCommand.java, and
MetadataQuorumCommand.java.
KafkaAdminClient changes:
- Add the AdminBootstrapAddresses class to handle extracting bootstrap.servers or
bootstrap.controllers from the config map for KafkaAdminClient.
- In AdminMetadataManager, store the new usingBootstrapControllers boolean. Generalize
authException to encompass the concept of fatal exceptions in general. (For example, the
fatal exception where we talked to the wrong node type.) Treat
MismatchedEndpointTypeException and UnsupportedEndpointTypeException as fatal exceptions.
- Extend NodeProvider to include information about whether bootstrap.controllers is supported.
- Modify the APIs described above to support bootstrap.controllers.
Server-side changes:
- Support DescribeConfigsRequest on kcontrollers.
- Add KRaftMetadataCache to the kcontroller to simplify implemeting describeConfigs (and
probably more APIs in the future). It's mainly a wrapper around MetadataImage, so there is
essentially no extra resource consumption.
- Split RuntimeLoggerManager out of ConfigAdminManager to handle the incrementalAlterConfigs
support for BROKER_LOGGER. This is now supported on kcontrollers as well as brokers.
- Fix bug in AuthHelper.computeDescribeClusterResponse that resulted in us always sending back
BROKER as the endpoint type, even on the kcontroller.
Miscellaneous:
- Fix a few places in exceptions and log messages where we wrote "broker" instead of "node".
For example, an exception in NodeApiVersions.java, and a log message in NetworkClient.java.
- Fix the slf4j log prefix used by KafkaRequestHandler logging so that request handlers on a
controller don't look like they're on a broker.
- Make the FinalizedVersionRange constructor public for the sake of a junit test.
- Add unit and integration tests for the above.
Reviewers: David Arthur <mumrah@gmail.com>, Doguscan Namal <namal.doguscan@gmail.com>
2023-09-27 05:43:42 +08:00
|
|
|
<allow class="org.apache.kafka.clients.CommonClientConfigs" />
|
2023-07-18 17:02:40 +08:00
|
|
|
<allow pkg="com.fasterxml.jackson" />
|
|
|
|
<allow pkg="org.apache.kafka.server.util.json" />
|
2023-07-06 20:56:05 +08:00
|
|
|
|
2023-07-18 16:38:56 +08:00
|
|
|
<allow class="org.apache.kafka.server.util.TopicFilter.IncludeList" />
|
2024-03-29 11:07:42 +08:00
|
|
|
<allow class="org.apache.kafka.test.TestUtils" />
|
2023-07-06 20:56:05 +08:00
|
|
|
<subpackage name="timer">
|
|
|
|
<allow class="org.apache.kafka.server.util.MockTime" />
|
2023-07-14 23:41:06 +08:00
|
|
|
<allow class="org.apache.kafka.server.util.ShutdownableThread" />
|
2023-07-06 20:56:05 +08:00
|
|
|
</subpackage>
|
2023-06-20 22:50:46 +08:00
|
|
|
</subpackage>
|
2024-04-20 04:14:23 +08:00
|
|
|
<subpackage name="config">
|
|
|
|
<allow pkg="org.apache.kafka.server"/>
|
|
|
|
</subpackage>
|
2023-04-18 05:52:28 +08:00
|
|
|
</subpackage>
|
|
|
|
|
2023-08-09 16:32:45 +08:00
|
|
|
<subpackage name="admin">
|
|
|
|
<allow pkg="org.apache.kafka.server.common" />
|
|
|
|
</subpackage>
|
2024-04-20 04:14:23 +08:00
|
|
|
|
2023-04-18 05:52:28 +08:00
|
|
|
</import-control>
|