Connectors
Kafka Connect connectors, their tasks, and their configuration are monitored and managed from the Connectors page in Cloudera Surveyor for Apache Kafka.
Connectors page
The Connectors page lists all connectors on the selected Kafka Connect cluster. Monitor the status and state of each connector and of its tasks. Filter and sort connectors by name, status, state, or type. Add new connectors as needed.
At the top of the page, health summary tiles display the total number of connectors on the selected Kafka Connect cluster categorized by status.
Beneath the tiles, a table displays the following connector attributes:
- Name – The unique name of the connector on the Kafka Connect cluster. Click to open the Connector Details page.
- Status – The overall health status of the connector.
- State – The runtime state of the connector in Kafka Connect, such as
Running,Paused, orFailed. - Type – The direction in which the connector moves data. A
Sourceconnector moves data from an external system into Kafka. ASinkconnector moves data from Kafka into an external system. - Tasks – The number of tasks of the connector, followed by the number of tasks in each status.
- Plugin Name – The short name of the connector plugin, which is its
class name without the package name. For example,
JdbcSinkConnector.
Click Add Connector to add a new connector.
Click any connector row to open the Entity Details drawer for quick
access to all connector attributes. Click the connector name to go to the Connector
Details page.
Connector Details page
The Connector Details page provides information about an individual connector and its tasks. At the top of the page, a summary displays the status, state, type, and task count of the connector, together with the class name of its plugin and its maximum number of tasks. Use the Actions menu at the top right of the page to start, stop, pause, restart, or delete the connector.
The page organizes connector information through the following tabs:
-
Tasks – View the tasks of the connector, the status and state of each task, and the Kafka Connect worker that runs it. When a task has an error, click View Error in its row to display the error trace. Restart an individual task with the
icon on the right side of its row.
-
Configuration – View and edit the configuration properties of the connector. Validate your changes against the connector plugin before you apply them.
-
Topics – View the Kafka topics that the connector has read from or written to.
Adding connectors
Add new connectors to a Kafka Connect cluster in Cloudera Surveyor
using the Add Connector option on the Connectors page.
A connector moves data between Kafka and an external system. A source connector reads data from an external system, such as a database, and writes it to Kafka topics. A sink connector reads data from Kafka topics and writes it to an external system. The connector plugin, installed on the Kafka Connect cluster, provides the logic of the connector, and the configuration properties tell the connector what to read and where to write. Kafka Connect divides the work of a connector into tasks, which run in parallel.
In Cloudera Surveyor, you add connectors using the option, which opens the Add Connector drawer. In the drawer, you name the connector, select its plugin, set its maximum number of tasks, and enter the configuration properties that the plugin requires. Before you create the connector, you can validate the configuration against the plugin. Kafka Connect checks every property and reports missing and invalid values, so you can fix them before the connector starts.
-
You must have the necessary permissions to add and validate connectors in Kafka Connect. In Apache Ranger, the required permissions are as follows:
View on the Cluster resource and Create on the Connector resource to add a connector.
Validate on the Cluster resource to validate the connector configuration.
-
The plugin of the connector must be installed on the Kafka Connect cluster. You can check the installed plugins on the Plugins tab of the Connect Cluster Details page.
-
The configuration properties of a connector depend on its connector plugin. Check the documentation of the plugin for the properties it requires.
Verify that the connector is running. After the connector appears on the
Connectors page, click its Name to open the
Connector Details page, and check that the state of the connector and
of each task on the Tasks tab is Running. If a task is
Failed, click View Error in its row to display the
error trace.
Updating connector configuration
Update the configuration properties of connectors in Cloudera Surveyor using the Apply Changes option on the
Configuration tab of the Connector Details pages.
The configuration properties of a connector determine what the connector does, such as
which topics it reads from, which external system it connects to, and how many tasks it can
run. In Cloudera Surveyor, you update these properties using the option. The Configuration tab lists all properties of
the connector. You can edit, add, and delete properties, validate the result, and then apply
all changes in a single operation. Modified properties are marked with a
Modified tag, and changes are staged for review before being applied. If
you switch tabs with unsaved changes, a warning is displayed. If you leave the page, your
edits are preserved until you return.
You update a connector, for example, to point a sink connector to a new database, or to
increase tasks.max so that the connector can process data in more tasks in
parallel.
The connector name (name) and the connector plugin
(connector.class) are locked. You can change the value of the maximum
number of tasks (tasks.max), but you cannot remove it.
-
You must have the necessary permissions to update and validate connectors in Kafka Connect. In Apache Ranger, the required permissions are as follows:
View on the Cluster resource and Edit on the Connector resource to update connector configuration.
Validate on the Cluster resource to validate the connector configuration.
Managing the connector lifecycle
Start, stop, pause, restart, or delete connectors in Cloudera Surveyor using the Actions menu on the Connector Details page.
A connector runs as a connector instance and a set of tasks on the workers of the Kafka Connect cluster. The connector instance coordinates the work, and the tasks move the data. In Cloudera Surveyor, you control a connector using the menu.
Choose the action based on how long you want to interrupt data movement. Pause a connector for a short interruption, for example, while you perform maintenance on the database that a sink connector writes to. Stop a connector for a longer interruption, because a stopped connector releases its tasks. Restart a connector to recover the connector instance from a failure.
-
You must have the necessary permissions to manage connectors in Kafka Connect. In Apache Ranger, the required permissions are as follows:
View on the Cluster resource and Manage on the Connector resource to start, stop, pause, and restart a connector.
View on the Cluster resource and Delete on the Connector resource to delete a connector.
- Restarting a connector does not restart its tasks. You must restart tasks individually.
Restarting connector tasks
Restart an individual task of a connector in Cloudera Surveyor from the Tasks tab of the Connector Details page, for example, to recover a task that failed.
The tasks of a connector move the data. Each task can fail independently of the connector and the other tasks. For example, a task fails when the external system it reads from or writes to is unavailable. After you fix the cause of the failure, restart the task on the tab.
-
You must have the necessary permissions to restart connector tasks in Kafka Connect. In Apache Ranger, the required permissions are View on the Cluster resource and Manage on the Connector resource.
Using inline and file-based sensitive data in connector configurations
Store connector credentials using the Secret Service in Anywhere Cloud, share secrets with the Connect cluster's workload identity, and reference them in connector configurations using secret references.
Connectors often read from and write to secured external services and require sensitive data such as passwords, API keys, and TLS certificates to establish a connection. Some connector properties expect file path references rather than inline string values. For example, a connector that uses SSL may require the path to a PEM certificate or a PKCS12 truststore file. The Secret Service in Anywhere Cloud Console addresses both problems. It stores sensitive data securely so that plaintext values never appear in a stored connector configuration. It also provides a way to supply file-based data to a connector.
In Cloudera Surveyor, you can reference data stored in secrets in your connector configuration using a dedicated syntax. You add these references either when creating a new connector or when editing the configuration of an existing connector.
-
A Vault is set up and connected in Anywhere Cloud Console. For instructions, see Configuring secrets.
-
You must have the sensitive data you want to store. For example, the password, certificate, or truststore file the connector needs to connect to its external system.
-
You must have access to a Bash-compatible shell environment with
curl.
The secret is shared with your Kafka Connect cluster, and your connector is configured to securely resolve the referenced values at runtime.
Continue configuring your connector. When you are finished, create the new connector or apply the configuration to update an existing one.
