Adding Kafka as Data Provider
You need to register Kafka as a Data Provider using the Streaming SQL Console to create Kafka tables in SQL Stream Builder (SSB).
- Make sure that you have Kafka service on your cluster.
- Make sure that you have the right permissions set in Ranger.
-
Navigate to the Streaming SQL Console.
- Go to your cluster in Cloudera Manager.
- Select SQL Stream Builder from the list of services.
- Click Web UI > SQLStreamBuilder Console.
The Streaming SQL Console opens in a new window. - Click Data Providers from the main menu.
-
Click Register Kafka Provider.
The Add Kafka Provider window appears.
- Add a Name to your Kafka provider.
-
Add the broker host name(s) to Brokers.
You need to copy the Kafka broker name(s) from Cloudera Manager.
- Go to your cluster in Cloudera Manager.
- Click Kafka from the list of services.
- Click Instances.
- Copy the hostname of the Kafka broker(s) you want to use.
- Go back to the Add Kafka Provider page.
-
Paste the broker hostname to the Brokers
field.
-
Add the default Kafka port after the hostname(s).
Example:
docs-test-1.vpc.cloudera.com:9092, docs-test-2.vpc.cloudera.com:9092
-
Select the Connection Protocol.
The connection protocol must be the same as it is configured for the Kafka cluster in Cloudera Manager.
You can choose from the following protocols:
- Select Plaintext, and click Save Changes.
- Select SSL, and click Save Changes.
-
Select SASL/SSL, and choose an SASL
Mechanism.
- Select Kerberos, and provide the Kafka Truststore location. Click Save Changes.
- Select Plain, and provide the SASL username and password. Click Save Changes.
-
Select SASL/PLAINTEXT, and choose an
SASL Mechanism.
- Select Kerberos. Click Save Changes.
- Select Plain, and provide the SASL username and password. Click Save Changes.