Class ConfluentLicenseValidator
java.lang.Object
io.confluent.license.validator.ConfluentLicenseValidator
- All Implemented Interfaces:
Closeable,AutoCloseable,Consumer<LicenseChanged>,Supplier<org.apache.kafka.server.license.LicenseTrackingInfoHolder>,org.apache.kafka.common.Configurable,org.apache.kafka.server.license.LicenseValidator
public class ConfluentLicenseValidator
extends Object
implements org.apache.kafka.server.license.LicenseValidator, Consumer<LicenseChanged>
License validator used by Kafka brokers for proprietary features. This includes license
metrics and periodic error logging for expired and invalid licenses.
The component using the license (e.g. broker) will start regardless of whether the
license is invalid or has expired. An error is logged periodically. If the license is missing,
it will create a TRIAL license.
License is stored in a Kafka topic in the MDS cluster if MDS is enabled. Otherwise it is stored
in the Kafka cluster associated with the component.
Since LicenseManager is used by several components, broker-specific startup sequence is
managed by ConfluentLicenseValidator. If a valid license is configured, license store is
started asynchronously. License is registered if/when license store start up completes.
Broker starts up successfully if a valid license is configured in server.properties even
if the license topic cannot be created or is unavailable. If a valid license is not configured,
license validator blocks on the license store during start up and broker start up fails if
the license topic is unavailable within the create timeout.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(LicenseChanged licenseChanged) voidclose()voidfinal booleanenabled()org.apache.kafka.server.license.LicenseTrackingInfoHolderget()Provides LicenseTrackingInfoHolder, which is used to retrieve tracking identifiers from License to Segment without exposing internal LicenseManager or License.booleanboolean
-
Field Details
-
METRIC_GROUP
- See Also:
-
METRIC_NAME
- See Also:
-
-
Constructor Details
-
ConfluentLicenseValidator
public ConfluentLicenseValidator()
-
-
Method Details
-
configure
-
enabled
public final boolean enabled()- Specified by:
enabledin interfaceorg.apache.kafka.server.license.LicenseValidator
-
start
- Specified by:
startin interfaceorg.apache.kafka.server.license.LicenseValidator
-
isLicenseValid
public boolean isLicenseValid()- Specified by:
isLicenseValidin interfaceorg.apache.kafka.server.license.LicenseValidator
-
accept
- Specified by:
acceptin interfaceConsumer<LicenseChanged>
-
get
public org.apache.kafka.server.license.LicenseTrackingInfoHolder get()Provides LicenseTrackingInfoHolder, which is used to retrieve tracking identifiers from License to Segment without exposing internal LicenseManager or License. -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
isSubTypeCpc
public boolean isSubTypeCpc()- Specified by:
isSubTypeCpcin interfaceorg.apache.kafka.server.license.LicenseValidator
-