Package org.apache.kafka.connect.health
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 Summary
Modifier and TypeMethodDescriptiondefault ConnectClusterDetails
Get details about the setup of the Connect cluster.connectorConfig
(String connName) Lookup the current configuration of a connector.connectorHealth
(String connName) Lookup the current health of a connector and its tasks.Get the names of the connectors currently deployed in this cluster.
-
Method Details
-
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
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 ofconnectors()
may no longer be available and could result inNotFoundException
.- 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
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 ofconnectors()
may no longer be available and could result inNotFoundException
.- 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 foundUnsupportedOperationException
- if the default implementation has not been overridden
-
clusterDetails
Get details about the setup of the Connect cluster.- Returns:
- a
ConnectClusterDetails
object containing information about the cluster - Throws:
UnsupportedOperationException
- if the default implementation has not been overridden
-