Interface ConnectClusterState


  • public interface ConnectClusterState
    Provides the ability to lookup connector metadata, including status and configurations, as well as immutable cluster information such as Kafka cluster ID. This is made available to ConnectRestExtension implementations. The Connect framework provides the implementation for this interface.
    • Method Detail

      • connectors

        Collection<String> connectors()
        Get the names of the connectors currently deployed in this cluster. This is a full list of connectors in the cluster gathered from the current configuration, which may change over time.
        Returns:
        collection of connector names, never null
      • connectorHealth

        ConnectorHealth connectorHealth​(String connName)
        Lookup the current health of a connector and its tasks. This provides the current snapshot of health by querying the underlying herder. A connector returned by previous invocation of connectors() may no longer be available and could result in NotFoundException.
        Parameters:
        connName - name of the connector
        Returns:
        the health of the connector for the connector name
        Throws:
        NotFoundException - if the requested connector can't be found
      • connectorConfig

        default Map<String,​String> connectorConfig​(String connName)
        Lookup the current configuration of a connector. This provides the current snapshot of configuration by querying the underlying herder. A connector returned by previous invocation of connectors() may no longer be available and could result in NotFoundException.
        Parameters:
        connName - name of the connector
        Returns:
        the configuration of the connector for the connector name
        Throws:
        NotFoundException - if the requested connector can't be found
        UnsupportedOperationException - if the default implementation has not been overridden