MAPR DB SINK CONNECTOR
The Kafka Connect MapR DB Sink Connector provides a way to export data from an Apache Kafka® topic and write data to a MapR DB cluster.
The MapR DB Sink Connector for Confluent Platform includes the following features:
This connector guarantees that records from the Kafka topic are delivered at least once.
This connector supports the Dead Letter Queue (DLQ) functionality. For information about accessing and using the DLQ, see Confluent Platform Dead Letter Queue.
The following are required to run the Kafka Connect MapR DB Sink Connector:
You can install this connector by using the Confluent Hub client installation instructions or by manually downloading the ZIP file.
Important
You must install the connector on every machine where Connect will run.
An install of the MapR client. The MapR client must work properly on the host running the connect worker process. The Kafka Connect worker process must be started with the following command:
-Dmapr.home.dir=/opt/mapr -Dmapr.library.flatclass
You can do this by exporting the KAFKA_OPTS environment variable before starting Kafka Connect. For example:
export KAFKA_OPTS="-Dmapr.home.dir=/opt/mapr -Dmapr.library.flatclass"
An install of the Confluent Hub Client.
Note
This is installed by default with Confluent Enterprise.
An install of the latest (latest) connector version.
latest
To install the latest connector version, navigate to your Confluent Platform installation directory and run the following command:
confluent-hub install confluentinc/kafka-connect-maprdb:latest
You can install a specific version by replacing latest with a version number as shown in the following example:
confluent-hub install confluentinc/kafka-connect-maprdb:1.0.0-preview
Download and extract the ZIP file for your connector and then follow the manual connector installation instructions.
You can use this connector for a 30-day trial period without a license key.
After 30 days, this connector is available under a Confluent enterprise license. Confluent issues Confluent enterprise license keys to subscribers, along with providing enterprise-level support for Confluent Platform and your connectors. If you are a subscriber, please contact Confluent Support at support@confluent.io for more information.
See Confluent Platform license for license properties and License topic configuration for information about the license topic.
For a complete list of configuration properties for this connector, see MapR DB Sink Connector Configuration properties.
For an example of how to get Kafka Connect connected to Confluent Cloud, see Distributed Cluster.
The table on the MapR DB cluster is selected based on the topic name. If you need to change this take a look at the RegexRouter transformation which can be used to change the topic name before it’s sent to MapR DB.
This configuration is used typically along with standalone workers.
name=MapRDBSinkConnector1 connector.class=io.confluent.connect.mapr.db.MapRDBSinkConnector tasks.max=1 topics=< Required Configuration >
This configuration is used typically along with distributed workers. Write the following json to connector.json, configure all of the required values, and use the command below to post the configuration to one the distributed connect worker(s). Check here for more information about the Kafka Connect REST API
{ "config" : { "name" : "MapRDBSinkConnector1", "connector.class" : "io.confluent.connect.mapr.db.MapRDBSinkConnector", "tasks.max" : "1", "topics" : "< Required Configuration >" } }
Use curl to post the configuration to one of the Kafka Connect Workers. Change http://localhost:8083/ the endpoint of one of your Kafka Connect worker(s).
To create a new connector, run the following command:
curl -s -X POST -H 'Content-Type: application/json' --data @connector.json http://localhost:8083/connectors
To update an existing connector, run the following command:
curl -s -X PUT -H 'Content-Type: application/json' --data @connector.json http://localhost:8083/connectors/MapRDBSinkConnector1/config