启动kafka集群,关闭kafka集群脚本 在$KAFKA_HOME/bin下新建如下脚本文件 start-kafka.sh #!/bin/bash BROKERS="mini41 mini42 mini43" APPHOME="/home/hadoop/apps/kafka" APP_NAME="kafka_2.10-0.10.1.0" for i in $BROKERS do echo "Starting ${APP_NAME} o
1. QuorumPeerMain运行 1)判断是采用单实例模式还是多实例模式启动QuorumPeerMain 2)在多实例模式下,加载启动参数中指定的配置文件 3)启动QuorumPeer public class QuorumPeerMain { ... protected QuorumPeer quorumPeer; public static void main(String[] args) { QuorumPeerMain main = new QuorumPeerMain(); tr