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 toConnectRestExtension
implementations. The Connect framework provides the implementation for this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ConnectClusterDetails
clusterDetails()
Get details about the setup of the Connect cluster.default Map<String,String>
connectorConfig(String connName)
Lookup the current configuration of a connector.ConnectorHealth
connectorHealth(String connName)
Lookup the current health of a connector and its tasks.Collection<String>
connectors()
Get the names of the connectors currently deployed in this cluster.
-
-
-
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 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
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 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
default ConnectClusterDetails 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
-
-