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.
  • Field Details

  • Constructor Details

    • ConfluentLicenseValidator

      public ConfluentLicenseValidator()
  • Method Details

    • configure

      public void configure(Map<String,?> configs)
      Specified by:
      configure in interface org.apache.kafka.common.Configurable
    • enabled

      public final boolean enabled()
      Specified by:
      enabled in interface org.apache.kafka.server.license.LicenseValidator
    • start

      public void start(String componentId)
      Specified by:
      start in interface org.apache.kafka.server.license.LicenseValidator
    • isLicenseValid

      public boolean isLicenseValid()
      Specified by:
      isLicenseValid in interface org.apache.kafka.server.license.LicenseValidator
    • accept

      public void accept(LicenseChanged licenseChanged)
      Specified by:
      accept in interface Consumer<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.
      Specified by:
      get in interface Supplier<org.apache.kafka.server.license.LicenseTrackingInfoHolder>
      Returns:
      LicenseTrackingInfoHolder
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable