Verifying record processing
Determine if the connector is processing records.
Is the connector running
To determine if the connector is running, check the log for commit offset messages. A
commit offset message is logged every 10 seconds. It confirms that the instance (for example
cassandra-sink-2-0
) is running and processing records. The connector writes
back to a Kafka offset topic to ensure that tasks continue where they left off after a
rebalancing or restart.
Example commit offset
message:
INFO WorkerSinkTask{id=cassandra-sink-2-0} Committing offsets asynchronously using sequence
number 240: {tick-stream-json-0=OffsetAndMetadata{offset=5000000, metadata=''},
tick-stream-json-2=OffsetAndMetadata{offset=5000000, metadata=''},
tick-stream-json-1=OffsetAndMetadata{offset=3000000, metadata=''},
tick-stream-json-4=OffsetAndMetadata{offset=7000000, metadata=''},
tick-stream-json-3=OffsetAndMetadata{offset=7000000, metadata=''},
tick-stream-json-6=OffsetAndMetadata{offset=6000000, metadata=''},
tick-stream-json-5=OffsetAndMetadata{offset=6000000, metadata=''},
tick-stream-json-8=OffsetAndMetadata{offset=6000000, metadata=''},
tick-stream-json-7=OffsetAndMetadata{offset=7000000, metadata=''},
tick-stream-json-9=OffsetAndMetadata{offset=8000000, metadata=''}}
(org.apache.kafka.connect.runtime.WorkerSinkTask:325)
Records written to DataStax Enterprise database
The connector uses the DataStax Enterprise (DSE) Java driver to send write requests to the corresponding tables. To verify the number of records processed:
- The driver captures the stastics in the Kafka JMX MBeans. See Monitoring DataStax Apache Kafka Connector.
- On a DSE database node, use
cqlsh
to query the database table.