kafka Commands
- taolius
- Jun 8, 2016
- 1 min read
/opt/meridian/kafka/bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic netra-topic
/opt/meridian/kafka/bin/kafka-topics.sh --list --zookeeper localhost:2181
echo "Stopping Zookeeper services..."
service network-performance-topology stop
service meridian-storm-topology stop
service stormui stop
service supervisor stop
service nimbus stop
service kafka stop
service zookeeper stop
echo "Cleanup the Redis Cache..."
redis-cli FLUSHALL
echo "Stopping Other services..."
service redis stop
sleep 10
echo "Stopping FrontFacing services..."
#service meridian-rest-service stop
service tomcat stop
service elasticsearch stop
echo "Cleaning up zookeeper and kafka data..."
rm -fr /opt/meridian/zookeeper/data/version-2/*
rm -fr /opt/meridian/kafka/data/*
rm -fr /opt/meridian/storm/current/logs/*
rm -fr /opt/meridian/tomcat/logs/*
############ STOP COMPLETE ###############
sleep 10
echo "Starting Zookeeper services..."
service zookeeper start
service kafka start
##################################################################
echo "Starting Other services..."
service redis start
service elasticsearch start
service tomcat start
#service meridian-rest-service start
echo "Creating Kafka Topics..."
sleep 10
/opt/meridian/kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic netra-topic --partitions 1 --replication-factor 1
/opt/meridian/kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic tca_topic --partitions 1 --replication-factor 1
/opt/meridian/kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic snmp_traps --partitions 1 --replication-factor 1
/opt/meridian/kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic meridian-websocket --partitions 1 --replication-factor 1
/opt/meridian/kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic meridian-test --partitions 1 --replication-factor 1
/opt/meridian/kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic network-performance --partitions 1 --replication-factor 1
/opt/meridian/kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic fault-topic --partitions 1 --replication-factor 1
/opt/meridian/kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic linkevent-topic --partitions 1 --replication-factor 1
/opt/meridian/kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic bt-topic --partitions 1 --replication-factor 1
/opt/meridian/kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic netra-rawdata --partitions 1 --replication-factor 1
/opt/meridian/kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --create --topic netra-notifications --partitions 1 --replication-factor 1
/opt/meridian/kafka/bin/kafka-topics.sh --alter --topic meridian-websocket --zookeeper localhost:2181 --config retention.ms=300000
echo "Start Other Services"
service nimbus start
service supervisor start
service stormui start
service meridian-storm-topology start
service network-performance-topology start
Comments