Deploying and managing Kafka Connect connectors in SMM
Learn how to use the SMM UI to deploy new Kafka Connect connectors using the Connector Setup wizard, as well as how to reconfigure, pause, resume, restart, and delete existing connectors. Additionally, learn about the various features and options SMM provides for editing connector configurations.
Deploying a Kafka Connect connector in SMM
Kafka Connect connectors are deployed in SMM using the Connector Setup wizard. Learn how to deploy a new connector using the wizard.
- By default, you can use the Connector Setup wizard to deploy any connector that is shipped with Cloudera Runtime. The only exceptions are the FileStream example connectors (FileStreamSourceConnector and FileStreamSinkConnector). Although these connectors are part of the Kafka distribution and are shipped with Cloudera Runtime, they are not available by default in the Connector Setup wizard. This is because neither connector is considered production ready. If you want to deploy an instance of these connectors, you must install them first. For more information, see Installing Kafka Connect connectors.
- Third-party connectors can be deployed using the wizard, but must be installed first. For more information, see Installing Kafka Connect connectors.
- Before deploying any connector, Cloudera recommends that you review the documentation of the connector. For more information regarding each connector shipped in CDP, see Connectors.
Pausing, resuming, restarting, and deleting a Kafka Connect connector in SMM
Learn how to pause, resume, restart, or delete an existing Kafka Connect Connector in SMM.
Reconfiguring Kafka Connect connectors in SMM
Learn how to edit the configuration of a running Kafka Connect connector using the SMM UI.
Connector configuration features in SMM
Learn about the various configuration features and options that you can use when configuring Kafka Connect connectors in SMM.
The SMM UI includes two pages where you configure Kafka Connect connector properties. The Connector Configuration step of the Connector Setup wizard and the tab. Both pages include various features and options that are designed to help you with connector configuration. The following sections go over each of the configuration options available on the UI.
Configuring properties
Each row on the Connector Configuration page represents the key (name)
and configuration value of a specific property. You can use the icons next to each property to
add or remove properties. Clicking next to a property opens a context menu that includes additional
configuration options. The options available in the context menu depend on the property. For example, you can edit and
reset the connector.class
property, but you cannot configure its type.
- Adding properties
- Click to add a new property. An empty row appears for the new property. Enter property keys in the left field and property values in the right field. When you select a key field, a list of suggested properties appear that are valid for the connector. The list is automatically filtered when you start typing.
- Deleting properties
- Click to delete a property.
Use
connector.class
.
to remove all properties from the configuration with the exception of
- Editing properties
- Click
Edit to edit the configuration value of a property in a separate window. Use this
option if the value you add is long, complex, or consists of multiple lines.
If you are deploying a NiFi Stateless Sink or Source connector, the modal that opens with for the
flow.snapshot
property is unique and includes the Browse... and Save and Enhance options. Browse... enables you to upload a flow definition JSON from your machine, Save and Enhance adds the parameters specified in your flow definition to the connector configuration. For more information onflow.snapshot
configuration, see Configuring flow.snapshot for Stateless NiFi connectors. - Resetting properties
- You can use Reset value to reset the value of a single property.
Alternatively, you can use to reset the full configuration. The reset options behave uniquely depending on
the configuration page that you use them on. When deploying new connectors using the Connector Configuration page of the wizard:
- Reset value resets the value to the default value set in the configuration template. This option is not available for properties that are not part of the template.
- resets all configuration properties and reverts the configuration to the default configuration template.
When editing the configuration of existing connectors on thepage:- Reset value resets the value to the last value that the connector was deployed with. This option is not available for new properties that you add to the configuration while editing the configuration.
- resets all configuration properties and reverts to the configuration that the connector was last deployed with.
- Type configuration
- The String
,
Boolean, Number, and Password options enable you to set the type of the
property. Setting the type of a property changes the property's value field depending on the
type you select.
- String sets the type of the property to string and changes the input field to a single line text box.
- Number sets the type to number and changes the input field to a text box that only allows negative and positive whole numbers and decimals.
- Boolean sets the type of the property to boolean and changes the input field to a checkbox.
-
Password sets the type of the property to password.
Selecting Password hides (locks) the value on the UI and stores it in a secure manner. Once the connector is deployed, properties marked as passwords are encrypted and stored securely in an internal Kafka topic. The actual values only resolve at runtime. These values cannot be retrieved or otherwise read from the configuration of the connector. In most cases, you use this option to hide passwords or other types of sensitive credentials found in connector configurations, however, you can use this option for any property value that your organization considers sensitive.
Property search and filtering
At the top of the page you can find a search bar that you can use to search and filter for connector properties. Search only works for property keys, values are disregarded. When you search for a string, the Properties section of the page is automatically filtered and only the relevant properties are shown. The number of matches is displayed next to Properties.
In addition to searching, you can filter properties based on their group and importance. To do so, click the filter icon and select the relevant group and importance that you want to search for. To clear all applied filters, click Reset Filters.
Viewing property help
Hovering over (Help), found next to some property values, displays information about that property. What information is displayed is property dependent, but at minimum you are presented with a description of the property. If available, the group, importance, and expected type of a property is also displayed. The icon is only available for properties that have their metadata (description, type, group, and so on) defined.
Importing configurations
To import a configuration, click Import opens the Connector Config… modal.
. ClickingUsing the modal you can:
- Type or paste your configuration.
- Use Browse… to upload the contents of a file from your machine.
The configuration that you add can be a full configuration that contains all properties necessary for the connector. Alternatively, it can be a partial configuration that contains a select number of properties that you want to add to the configuration. The configuration you include in the text box must be in JSON format. For example:
{
"tasks.max": 1,
"key.converter": "org.apache.kafka.connect.storage.StringConverter",
"value.converter": "com.cloudera.dim.kafka.connect.converts.AvroConverter",
"value.converter.passthrough.enabled": true,
"value.converter.schema.registry.url": "http://schema-registry:9090/api/v1",
"topics": "avro_topic",
.
.
.
}
After adding properties, you can use the Import, Import and Enhance, or Add options to import the configuration. Each option imports the properties in a different way.
- Import
This option populates the Properties section with the keys and values you added in the Import Connector Config... modal. This option overwrites all existing properties in the configuration.
- Import and Enhance
This option populates the Properties section with the keys and values you added in the Import Connector Config... modal. Additionally, properties that are most likely needed for the respective connector are also added.
Import and Enhance is used specifically for the NiFi Stateless Source and NiFi Stateless Sink connectors. When this option is used, SMM parses the dataflow specified in
flow.snapshot
, extracts all parameters that are available in the dataflow, and adds them to the connector configuration. This option overwrites all existing properties in the configuration. - Add
This option amends the existing configuration with the properties from the Import Connector Config... modal. Use this option if you want to batch import additional properties to your configuration. For example, you can use this option to batch add security properties.
Exporting Configurations
To export a configuration, click Export opens the Configuration of the connector modal.
. Clicking- Click Copy to Clipboard to copy the configuration to the clipboard.
- Click Export to file to download the configuration as a JSON file.
Validating configurations
Before you can deploy or redeploy a connector, you must validate the configuration. This is done using Validate. If SMM finds any errors in the configuration, the properties that contain errors are highlighted in red, and an error message with the details regarding the configuration issue is displayed.
- If the connector was previously deployed and you are updating the configuration, the default value used will be the value that the connector was last deployed with.
- If you are configuring a new connector, the default value from the sample configuration is used.
- If you are configuring a new connector and there is no sample configuration or the sample configuration does not contain the property, the value defined in the ConfigDef class of the connector is used.
If the connector configuration is filtered when you run the validation and SMM finds errors with properties that are filtered, an error message is displayed on the top of the page notifying you that not all validation errors are visible. In a case like this, click Reset Filters to view all validation errors.