Created on 01-27-2022 04:21 PM - edited 05-24-2022 09:00 PM
A short how-to article on how to list CDP Data hub Kafka topics via command line:
/var/lib/cloudera-scm-agent/agent-cert/cm-auto-global_truststore.jks
BROKER_HOST=$(hostname -f)
KafkaClient { org.apache.kafka.common.security.plain.PlainLoginModule required username="<workload username>" password="<workload password>"; };
export KAFKA_OPTS=-Djava.security.auth.login.config=<LOCATION-OF-YOUR-JAASCONF>/jaas.conf
security.protocol=SASL_SSL sasl.mechanism=PLAIN sasl.kerberos.service.name=kafka ssl.truststore.location=/<LOCATION-OF-YOUR-TRUSTSTORE>/truststore.jks org.apache.kafka.common.security.plain.PlainLoginModule required username=<WORKLOAD-USER-NAME> password=<WORKLOAD-PASSWORD>
/opt/cloudera/parcels/CDH/bin/kafka-topics --list --bootstrap-server $BROKER_HOST:9093 --command-config <LOCATION-OF-YOUR-CLIENT-KERB-PROP-FILE>/client-kerberos.properties
Created on 02-01-2022 08:45 PM
Some more examples here: https://github.com/asdaraujo/cdp-examples