kafka安装

官网

http://kafka.apache.org/

安装包下载

https://www.apache.org/dyn/closer.cgi?path=/kafka/2.6.0/kafka_2.13-2.6.0.tgz
在这里插入图片描述

localhost:kafka_2.13-2.6.0 gaoxinfu$ pwd
/Users/gaoxinfu/using/kafka_2.13-2.6.0
localhost:kafka_2.13-2.6.0 gaoxinfu$ ls -la
total 88
drwxr-xr-x@   9 gaoxinfu  staff    288 10 20 18:06 .
drwxr-xr-x@  43 gaoxinfu  staff   1376 10 20 18:06 ..
-rw-r--r--@   1 gaoxinfu  staff   6148 10 20 18:06 .DS_Store
-rw-r--r--@   1 gaoxinfu  staff  29975  7 29 02:16 LICENSE
-rw-r--r--@   1 gaoxinfu  staff    337  7 29 02:16 NOTICE
drwxr-xr-x@  35 gaoxinfu  staff   1120  7 29 02:23 bin
drwxr-xr-x@  17 gaoxinfu  staff    544  7 29 02:23 config
drwxr-xr-x@ 104 gaoxinfu  staff   3328  7 29 02:23 libs
drwxr-xr-x@   3 gaoxinfu  staff     96  7 29 02:23 site-docs
localhost:kafka_2.13-2.6.0 gaoxinfu$ 

zookeeper启动与安装

启动前准备:修改zk数据的存储路径

在这里插入图片描述

localhost:kafka_2.13-2.6.0 gaoxinfu$ pwd
/Users/gaoxinfu/using/kafka_2.13-2.6.0
localhost:kafka_2.13-2.6.0 gaoxinfu$ ls -la
total 88
drwxr-xr-x@   9 gaoxinfu  staff    288 10 20 18:06 .
drwxr-xr-x@  43 gaoxinfu  staff   1376 10 20 18:06 ..
-rw-r--r--@   1 gaoxinfu  staff   6148 10 20 18:06 .DS_Store
-rw-r--r--@   1 gaoxinfu  staff  29975  7 29 02:16 LICENSE
-rw-r--r--@   1 gaoxinfu  staff    337  7 29 02:16 NOTICE
drwxr-xr-x@  35 gaoxinfu  staff   1120  7 29 02:23 bin
drwxr-xr-x@  17 gaoxinfu  staff    544  7 29 02:23 config
drwxr-xr-x@ 104 gaoxinfu  staff   3328  7 29 02:23 libs
drwxr-xr-x@   3 gaoxinfu  staff     96  7 29 02:23 site-docs
localhost:kafka_2.13-2.6.0 gaoxinfu$ mkdir data
localhost:kafka_2.13-2.6.0 gaoxinfu$ ls -la
total 88
drwxr-xr-x@  10 gaoxinfu  staff    320 10 20 18:21 .
drwxr-xr-x@  43 gaoxinfu  staff   1376 10 20 18:06 ..
-rw-r--r--@   1 gaoxinfu  staff   6148 10 20 18:06 .DS_Store
-rw-r--r--@   1 gaoxinfu  staff  29975  7 29 02:16 LICENSE
-rw-r--r--@   1 gaoxinfu  staff    337  7 29 02:16 NOTICE
drwxr-xr-x@  35 gaoxinfu  staff   1120  7 29 02:23 bin
drwxr-xr-x@  17 gaoxinfu  staff    544  7 29 02:23 config
drwxr-xr-x    2 gaoxinfu  staff     64 10 20 18:21 data
drwxr-xr-x@ 104 gaoxinfu  staff   3328  7 29 02:23 libs
drwxr-xr-x@   3 gaoxinfu  staff     96  7 29 02:23 site-docs
localhost:kafka_2.13-2.6.0 gaoxinfu$ cd data/
localhost:data gaoxinfu$ ls -la
total 0
drwxr-xr-x   2 gaoxinfu  staff   64 10 20 18:21 .
drwxr-xr-x@ 10 gaoxinfu  staff  320 10 20 18:21 ..
localhost:data gaoxinfu$ mkdir zk
localhost:data gaoxinfu$ ls -la
total 0
drwxr-xr-x   3 gaoxinfu  staff   96 10 20 18:21 .
drwxr-xr-x@ 10 gaoxinfu  staff  320 10 20 18:21 ..
drwxr-xr-x   2 gaoxinfu  staff   64 10 20 18:21 zk
localhost:data gaoxinfu$ pwd
/Users/gaoxinfu/using/kafka_2.13-2.6.0/data
localhost:data gaoxinfu$ cd zk/
localhost:zk gaoxinfu$ pwd
/Users/gaoxinfu/using/kafka_2.13-2.6.0/data/zk

修改为上面创建的路径:/Users/gaoxinfu/using/kafka_2.13-2.6.0/data/zk

启动zk

bin/zookeeper-server-start.sh config/zookeeper.properties

守护线程的方式启动
bin/zookeeper-server-start.sh -daemon config/zookeeper.properties
**

/Users/gaoxinfu/using/kafka_2.13-2.6.0
localhost:kafka_2.13-2.6.0 gaoxinfu$ 
localhost:kafka_2.13-2.6.0 gaoxinfu$ bin/zookeeper-server-start.sh config/zookeeper.properties
[2020-10-21 10:10:12,197] INFO Reading configuration from: config/zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-10-21 10:10:12,198] WARN config/zookeeper.properties is relative. Prepend ./ to indicate that you're sure! (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-10-21 10:10:12,204] INFO clientPortAddress is 0.0.0.0:2181 (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-10-21 10:10:12,205] INFO secureClientPort is not set (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-10-21 10:10:12,206] INFO autopurge.snapRetainCount set to 3 (org.apache.zookeeper.server.DatadirCleanupManager)
[2020-10-21 10:10:12,206] INFO autopurge.purgeInterval set to 0 (org.apache.zookeeper.server.DatadirCleanupManager)
[2020-10-21 10:10:12,206] INFO Purge task is not scheduled. (org.apache.zookeeper.server.DatadirCleanupManager)
[2020-10-21 10:10:12,207] WARN Either no config or no quorum defined in config, running  in standalone mode (org.apache.zookeeper.server.quorum.QuorumPeerMain)
[2020-10-21 10:10:12,210] INFO Log4j 1.2 jmx support found and enabled. (org.apache.zookeeper.jmx.ManagedUtil)
[2020-10-21 10:10:12,223] INFO Reading configuration from: config/zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-10-21 10:10:12,223] WARN config/zookeeper.properties is relative. Prepend ./ to indicate that you're sure! (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-10-21 10:10:12,224] INFO clientPortAddress is 0.0.0.0:2181 (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-10-21 10:10:12,224] INFO secureClientPort is not set (org.apache.zookeeper.server.quorum.QuorumPeerConfig)
[2020-10-21 10:10:12,224] INFO Starting server (org.apache.zookeeper.server.ZooKeeperServerMain)
[2020-10-21 10:10:12,226] INFO zookeeper.snapshot.trust.empty : false (org.apache.zookeeper.server.persistence.FileTxnSnapLog)
[2020-10-21 10:10:12,239] INFO Server environment:zookeeper.version=3.5.8-f439ca583e70862c3068a1f2a7d4d068eec33315, built on 05/04/2020 15:53 GMT (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,241] INFO Server environment:host.name=localhost (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,241] INFO Server environment:java.version=1.8.0_211 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,241] INFO Server environment:java.vendor=Oracle Corporation (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,241] INFO Server environment:java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,241] INFO Server environment:java.class.path=/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/activation-1.1.1.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/aopalliance-repackaged-2.5.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/argparse4j-0.7.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/audience-annotations-0.5.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/commons-cli-1.4.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/commons-lang3-3.8.1.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/connect-api-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/connect-basic-auth-extension-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/connect-file-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/connect-json-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/connect-mirror-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/connect-mirror-client-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/connect-runtime-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/connect-transforms-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/hk2-api-2.5.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/hk2-locator-2.5.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/hk2-utils-2.5.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-annotations-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-core-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-databind-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-dataformat-csv-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-datatype-jdk8-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-jaxrs-base-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-jaxrs-json-provider-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-module-jaxb-annotations-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-module-paranamer-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-module-scala_2.13-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jakarta.activation-api-1.2.1.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jakarta.annotation-api-1.3.4.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jakarta.inject-2.5.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jakarta.ws.rs-api-2.1.5.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jakarta.xml.bind-api-2.3.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/javassist-3.22.0-CR2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/javassist-3.26.0-GA.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/javax.servlet-api-3.1.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/javax.ws.rs-api-2.1.1.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jaxb-api-2.3.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jersey-client-2.28.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jersey-common-2.28.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jersey-container-servlet-2.28.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jersey-container-servlet-core-2.28.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jersey-hk2-2.28.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jersey-media-jaxb-2.28.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jersey-server-2.28.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jetty-client-9.4.24.v20191120.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jetty-continuation-9.4.24.v20191120.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jetty-http-9.4.24.v20191120.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jetty-io-9.4.24.v20191120.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jetty-security-9.4.24.v20191120.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jetty-server-9.4.24.v20191120.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jetty-servlet-9.4.24.v20191120.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jetty-servlets-9.4.24.v20191120.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jetty-util-9.4.24.v20191120.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jopt-simple-5.0.4.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/kafka-clients-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/kafka-log4j-appender-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/kafka-streams-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/kafka-streams-examples-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/kafka-streams-scala_2.13-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/kafka-streams-test-utils-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/kafka-tools-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/kafka_2.13-2.6.0-sources.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/kafka_2.13-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/log4j-1.2.17.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/lz4-java-1.7.1.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/maven-artifact-3.6.3.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/metrics-core-2.2.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/netty-buffer-4.1.50.Final.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/netty-codec-4.1.50.Final.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/netty-common-4.1.50.Final.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/netty-handler-4.1.50.Final.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/netty-resolver-4.1.50.Final.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/netty-transport-4.1.50.Final.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/netty-transport-native-epoll-4.1.50.Final.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/netty-transport-native-unix-common-4.1.50.Final.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/osgi-resource-locator-1.0.1.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/paranamer-2.8.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/plexus-utils-3.2.1.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/reflections-0.9.12.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/rocksdbjni-5.18.4.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/scala-collection-compat_2.13-2.1.6.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/scala-java8-compat_2.13-0.9.1.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/scala-library-2.13.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/scala-logging_2.13-3.9.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/scala-reflect-2.13.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/slf4j-api-1.7.30.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/slf4j-log4j12-1.7.30.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/snappy-java-1.1.7.3.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/validation-api-2.0.1.Final.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/zookeeper-3.5.8.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/zookeeper-jute-3.5.8.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/zstd-jni-1.4.4-7.jar (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,245] INFO Server environment:java.library.path=/Users/gaoxinfu/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:. (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,245] INFO Server environment:java.io.tmpdir=/var/folders/l7/t6tn885s3tx1s1yfjlcs3wx40000gn/T/ (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,248] INFO Server environment:java.compiler=<NA> (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,248] INFO Server environment:os.name=Mac OS X (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,249] INFO Server environment:os.arch=x86_64 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,249] INFO Server environment:os.version=10.15.6 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,249] INFO Server environment:user.name=gaoxinfu (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,249] INFO Server environment:user.home=/Users/gaoxinfu (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,249] INFO Server environment:user.dir=/Users/gaoxinfu/using/kafka_2.13-2.6.0 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,250] INFO Server environment:os.memory.free=497MB (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,250] INFO Server environment:os.memory.max=512MB (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,250] INFO Server environment:os.memory.total=512MB (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,254] INFO minSessionTimeout set to 6000 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,254] INFO maxSessionTimeout set to 60000 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,255] INFO Created server with tickTime 3000 minSessionTimeout 6000 maxSessionTimeout 60000 datadir /Users/gaoxinfu/using/kafka_2.13-2.6.0/data/zk/version-2 snapdir /Users/gaoxinfu/using/kafka_2.13-2.6.0/data/zk/version-2 (org.apache.zookeeper.server.ZooKeeperServer)
[2020-10-21 10:10:12,273] INFO Using org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory (org.apache.zookeeper.server.ServerCnxnFactory)
[2020-10-21 10:10:12,277] INFO Configuring NIO connection handler with 10s sessionless connection timeout, 1 selector thread(s), 8 worker threads, and 64 kB direct buffers. (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2020-10-21 10:10:12,296] INFO binding to port 0.0.0.0/0.0.0.0:2181 (org.apache.zookeeper.server.NIOServerCnxnFactory)
[2020-10-21 10:10:12,319] INFO zookeeper.snapshotSizeFactor = 0.33 (org.apache.zookeeper.server.ZKDatabase)
[2020-10-21 10:10:12,324] INFO Reading snapshot /Users/gaoxinfu/using/kafka_2.13-2.6.0/data/zk/version-2/snapshot.3 (org.apache.zookeeper.server.persistence.FileSnap)
[2020-10-21 10:10:12,339] INFO Snapshotting: 0x3 to /Users/gaoxinfu/using/kafka_2.13-2.6.0/data/zk/version-2/snapshot.3 (org.apache.zookeeper.server.persistence.FileTxnSnapLog)
[2020-10-21 10:10:12,361] INFO Using checkIntervalMs=60000 maxPerMinute=10000 (org.apache.zookeeper.server.ContainerManager)
[2020-10-21 10:10:12,639] WARN Connection request from old client /127.0.0.1:54715; will be dropped if server is in r-o mode (org.apache.zookeeper.server.ZooKeeperServer)

zk安装完成,使用zk-view-tool进行查看

在这里插入图片描述
从上面我们可以看到只有两个节点config和quota

zk-view-tool的安装参考

https://blog.csdn.net/u014636209/article/details/109194920

kafka启动与数据查看

kafka启动

重新开一个客户端执行下面的命令
bin/kafka-server-start.sh config/server.properties

localhost:kafka_2.13-2.6.0 gaoxinfu$ bin/kafka-server-start.sh config/server.properties
[2020-10-21 10:12:10,590] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$)
[2020-10-21 10:12:11,067] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util)
[2020-10-21 10:12:11,137] INFO Registered signal handlers for TERM, INT, HUP (org.apache.kafka.common.utils.LoggingSignalHandler)
[2020-10-21 10:12:11,142] INFO starting (kafka.server.KafkaServer)
[2020-10-21 10:12:11,143] INFO Connecting to zookeeper on localhost:2181 (kafka.server.KafkaServer)
[2020-10-21 10:12:11,177] INFO [ZooKeeperClient Kafka server] Initializing a new session to localhost:2181. (kafka.zookeeper.ZooKeeperClient)
[2020-10-21 10:12:11,188] INFO Client environment:zookeeper.version=3.5.8-f439ca583e70862c3068a1f2a7d4d068eec33315, built on 05/04/2020 15:53 GMT (org.apache.zookeeper.ZooKeeper)
[2020-10-21 10:12:11,188] INFO Client environment:host.name=localhost (org.apache.zookeeper.ZooKeeper)
[2020-10-21 10:12:11,188] INFO Client environment:java.version=1.8.0_211 (org.apache.zookeeper.ZooKeeper)
[2020-10-21 10:12:11,188] INFO Client environment:java.vendor=Oracle Corporation (org.apache.zookeeper.ZooKeeper)
[2020-10-21 10:12:11,188] INFO Client environment:java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/jre (org.apache.zookeeper.ZooKeeper)
[2020-10-21 10:12:11,188] INFO Client environment:java.class.path=/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/activation-1.1.1.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/aopalliance-repackaged-2.5.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/argparse4j-0.7.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/audience-annotations-0.5.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/commons-cli-1.4.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/commons-lang3-3.8.1.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/connect-api-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/connect-basic-auth-extension-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/connect-file-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/connect-json-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/connect-mirror-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/connect-mirror-client-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/connect-runtime-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/connect-transforms-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/hk2-api-2.5.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/hk2-locator-2.5.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/hk2-utils-2.5.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-annotations-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-core-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-databind-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-dataformat-csv-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-datatype-jdk8-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-jaxrs-base-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-jaxrs-json-provider-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-module-jaxb-annotations-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-module-paranamer-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jackson-module-scala_2.13-2.10.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jakarta.activation-api-1.2.1.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jakarta.annotation-api-1.3.4.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jakarta.inject-2.5.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jakarta.ws.rs-api-2.1.5.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jakarta.xml.bind-api-2.3.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/javassist-3.22.0-CR2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/javassist-3.26.0-GA.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/javax.servlet-api-3.1.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/javax.ws.rs-api-2.1.1.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jaxb-api-2.3.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jersey-client-2.28.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jersey-common-2.28.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jersey-container-servlet-2.28.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jersey-container-servlet-core-2.28.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jersey-hk2-2.28.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jersey-media-jaxb-2.28.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jersey-server-2.28.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jetty-client-9.4.24.v20191120.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jetty-continuation-9.4.24.v20191120.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jetty-http-9.4.24.v20191120.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jetty-io-9.4.24.v20191120.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jetty-security-9.4.24.v20191120.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jetty-server-9.4.24.v20191120.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jetty-servlet-9.4.24.v20191120.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jetty-servlets-9.4.24.v20191120.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jetty-util-9.4.24.v20191120.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/jopt-simple-5.0.4.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/kafka-clients-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/kafka-log4j-appender-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/kafka-streams-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/kafka-streams-examples-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/kafka-streams-scala_2.13-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/kafka-streams-test-utils-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/kafka-tools-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/kafka_2.13-2.6.0-sources.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/kafka_2.13-2.6.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/log4j-1.2.17.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/lz4-java-1.7.1.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/maven-artifact-3.6.3.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/metrics-core-2.2.0.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/netty-buffer-4.1.50.Final.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/netty-codec-4.1.50.Final.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/netty-common-4.1.50.Final.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/netty-handler-4.1.50.Final.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/netty-resolver-4.1.50.Final.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/netty-transport-4.1.50.Final.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/netty-transport-native-epoll-4.1.50.Final.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/netty-transport-native-unix-common-4.1.50.Final.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/osgi-resource-locator-1.0.1.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/paranamer-2.8.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/plexus-utils-3.2.1.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/reflections-0.9.12.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/rocksdbjni-5.18.4.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/scala-collection-compat_2.13-2.1.6.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/scala-java8-compat_2.13-0.9.1.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/scala-library-2.13.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/scala-logging_2.13-3.9.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/scala-reflect-2.13.2.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/slf4j-api-1.7.30.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/slf4j-log4j12-1.7.30.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/snappy-java-1.1.7.3.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/validation-api-2.0.1.Final.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/zookeeper-3.5.8.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/zookeeper-jute-3.5.8.jar:/Users/gaoxinfu/using/kafka_2.13-2.6.0/bin/../libs/zstd-jni-1.4.4-7.jar (org.apache.zookeeper.ZooKeeper)
[2020-10-21 10:12:11,191] INFO Client environment:java.library.path=/Users/gaoxinfu/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:. (org.apache.zookeeper.ZooKeeper)
[2020-10-21 10:12:11,191] INFO Client environment:java.io.tmpdir=/var/folders/l7/t6tn885s3tx1s1yfjlcs3wx40000gn/T/ (org.apache.zookeeper.ZooKeeper)
[2020-10-21 10:12:11,191] INFO Client environment:java.compiler=<NA> (org.apache.zookeeper.ZooKeeper)
[2020-10-21 10:12:11,191] INFO Client environment:os.name=Mac OS X (org.apache.zookeeper.ZooKeeper)
[2020-10-21 10:12:11,191] INFO Client environment:os.arch=x86_64 (org.apache.zookeeper.ZooKeeper)
[2020-10-21 10:12:11,191] INFO Client environment:os.version=10.15.6 (org.apache.zookeeper.ZooKeeper)
[2020-10-21 10:12:11,191] INFO Client environment:user.name=gaoxinfu (org.apache.zookeeper.ZooKeeper)
[2020-10-21 10:12:11,192] INFO Client environment:user.home=/Users/gaoxinfu (org.apache.zookeeper.ZooKeeper)
[2020-10-21 10:12:11,192] INFO Client environment:user.dir=/Users/gaoxinfu/using/kafka_2.13-2.6.0 (org.apache.zookeeper.ZooKeeper)
[2020-10-21 10:12:11,192] INFO Client environment:os.memory.free=974MB (org.apache.zookeeper.ZooKeeper)
[2020-10-21 10:12:11,192] INFO Client environment:os.memory.max=1024MB (org.apache.zookeeper.ZooKeeper)
[2020-10-21 10:12:11,192] INFO Client environment:os.memory.total=1024MB (org.apache.zookeeper.ZooKeeper)
[2020-10-21 10:12:11,195] INFO Initiating client connection, connectString=localhost:2181 sessionTimeout=18000 watcher=kafka.zookeeper.ZooKeeperClient$ZooKeeperClientWatcher$@2f7298b (org.apache.zookeeper.ZooKeeper)
[2020-10-21 10:12:11,205] INFO jute.maxbuffer value is 4194304 Bytes (org.apache.zookeeper.ClientCnxnSocket)
[2020-10-21 10:12:11,231] INFO zookeeper.request.timeout value is 0. feature enabled= (org.apache.zookeeper.ClientCnxn)
[2020-10-21 10:12:11,291] INFO [ZooKeeperClient Kafka server] Waiting until connected. (kafka.zookeeper.ZooKeeperClient)
[2020-10-21 10:12:11,298] INFO Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn)
[2020-10-21 10:12:11,315] INFO Socket connection established, initiating session, client: /0:0:0:0:0:0:0:1:55066, server: localhost/0:0:0:0:0:0:0:1:2181 (org.apache.zookeeper.ClientCnxn)
[2020-10-21 10:12:11,335] INFO Session establishment complete on server localhost/0:0:0:0:0:0:0:1:2181, sessionid = 0x10000304fe30000, negotiated timeout = 18000 (org.apache.zookeeper.ClientCnxn)
[2020-10-21 10:12:11,338] INFO [ZooKeeperClient Kafka server] Connected. (kafka.zookeeper.ZooKeeperClient)
[2020-10-21 10:12:11,749] INFO Cluster ID = N0IgGAqQRYecTsO6t0J_1w (kafka.server.KafkaServer)
[2020-10-21 10:12:11,753] WARN No meta.properties file under dir /tmp/kafka-logs/meta.properties (kafka.server.BrokerMetadataCheckpoint)
[2020-10-21 10:12:11,811] INFO KafkaConfig values: 
	advertised.host.name = null
	advertised.listeners = null
	advertised.port = null
	alter.config.policy.class.name = null
	alter.log.dirs.replication.quota.window.num = 11
	alter.log.dirs.replication.quota.window.size.seconds = 1
	authorizer.class.name = 
	auto.create.topics.enable = true
	auto.leader.rebalance.enable = true
	background.threads = 10
	broker.id = 0
	broker.id.generation.enable = true
	broker.rack = null
	client.quota.callback.class = null
	compression.type = producer
	connection.failed.authentication.delay.ms = 100
	connections.max.idle.ms = 600000
	connections.max.reauth.ms = 0
	control.plane.listener.name = null
	controlled.shutdown.enable = true
	controlled.shutdown.max.retries = 3
	controlled.shutdown.retry.backoff.ms = 5000
	controller.socket.timeout.ms = 30000
	create.topic.policy.class.name = null
	default.replication.factor = 1
	delegation.token.expiry.check.interval.ms = 3600000
	delegation.token.expiry.time.ms = 86400000
	delegation.token.master.key = null
	delegation.token.max.lifetime.ms = 604800000
	delete.records.purgatory.purge.interval.requests = 1
	delete.topic.enable = true
	fetch.max.bytes = 57671680
	fetch.purgatory.purge.interval.requests = 1000
	group.initial.rebalance.delay.ms = 0
	group.max.session.timeout.ms = 1800000
	group.max.size = 2147483647
	group.min.session.timeout.ms = 6000
	host.name = 
	inter.broker.listener.name = null
	inter.broker.protocol.version = 2.6-IV0
	kafka.metrics.polling.interval.secs = 10
	kafka.metrics.reporters = []
	leader.imbalance.check.interval.seconds = 300
	leader.imbalance.per.broker.percentage = 10
	listener.security.protocol.map = PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL
	listeners = null
	log.cleaner.backoff.ms = 15000
	log.cleaner.dedupe.buffer.size = 134217728
	log.cleaner.delete.retention.ms = 86400000
	log.cleaner.enable = true
	log.cleaner.io.buffer.load.factor = 0.9
	log.cleaner.io.buffer.size = 524288
	log.cleaner.io.max.bytes.per.second = 1.7976931348623157E308
	log.cleaner.max.compaction.lag.ms = 9223372036854775807
	log.cleaner.min.cleanable.ratio = 0.5
	log.cleaner.min.compaction.lag.ms = 0
	log.cleaner.threads = 1
	log.cleanup.policy = [delete]
	log.dir = /tmp/kafka-logs
	log.dirs = /tmp/kafka-logs
	log.flush.interval.messages = 9223372036854775807
	log.flush.interval.ms = null
	log.flush.offset.checkpoint.interval.ms = 60000
	log.flush.scheduler.interval.ms = 9223372036854775807
	log.flush.start.offset.checkpoint.interval.ms = 60000
	log.index.interval.bytes = 4096
	log.index.size.max.bytes = 10485760
	log.message.downconversion.enable = true
	log.message.format.version = 2.6-IV0
	log.message.timestamp.difference.max.ms = 9223372036854775807
	log.message.timestamp.type = CreateTime
	log.preallocate = false
	log.retention.bytes = -1
	log.retention.check.interval.ms = 300000
	log.retention.hours = 168
	log.retention.minutes = null
	log.retention.ms = null
	log.roll.hours = 168
	log.roll.jitter.hours = 0
	log.roll.jitter.ms = null
	log.roll.ms = null
	log.segment.bytes = 1073741824
	log.segment.delete.delay.ms = 60000
	max.connections = 2147483647
	max.connections.per.ip = 2147483647
	max.connections.per.ip.overrides = 
	max.incremental.fetch.session.cache.slots = 1000
	message.max.bytes = 1048588
	metric.reporters = []
	metrics.num.samples = 2
	metrics.recording.level = INFO
	metrics.sample.window.ms = 30000
	min.insync.replicas = 1
	num.io.threads = 8
	num.network.threads = 3
	num.partitions = 1
	num.recovery.threads.per.data.dir = 1
	num.replica.alter.log.dirs.threads = null
	num.replica.fetchers = 1
	offset.metadata.max.bytes = 4096
	offsets.commit.required.acks = -1
	offsets.commit.timeout.ms = 5000
	offsets.load.buffer.size = 5242880
	offsets.retention.check.interval.ms = 600000
	offsets.retention.minutes = 10080
	offsets.topic.compression.codec = 0
	offsets.topic.num.partitions = 50
	offsets.topic.replication.factor = 1
	offsets.topic.segment.bytes = 104857600
	password.encoder.cipher.algorithm = AES/CBC/PKCS5Padding
	password.encoder.iterations = 4096
	password.encoder.key.length = 128
	password.encoder.keyfactory.algorithm = null
	password.encoder.old.secret = null
	password.encoder.secret = null
	port = 9092
	principal.builder.class = null
	producer.purgatory.purge.interval.requests = 1000
	queued.max.request.bytes = -1
	queued.max.requests = 500
	quota.consumer.default = 9223372036854775807
	quota.producer.default = 9223372036854775807
	quota.window.num = 11
	quota.window.size.seconds = 1
	replica.fetch.backoff.ms = 1000
	replica.fetch.max.bytes = 1048576
	replica.fetch.min.bytes = 1
	replica.fetch.response.max.bytes = 10485760
	replica.fetch.wait.max.ms = 500
	replica.high.watermark.checkpoint.interval.ms = 5000
	replica.lag.time.max.ms = 30000
	replica.selector.class = null
	replica.socket.receive.buffer.bytes = 65536
	replica.socket.timeout.ms = 30000
	replication.quota.window.num = 11
	replication.quota.window.size.seconds = 1
	request.timeout.ms = 30000
	reserved.broker.max.id = 1000
	sasl.client.callback.handler.class = null
	sasl.enabled.mechanisms = [GSSAPI]
	sasl.jaas.config = null
	sasl.kerberos.kinit.cmd = /usr/bin/kinit
	sasl.kerberos.min.time.before.relogin = 60000
	sasl.kerberos.principal.to.local.rules = [DEFAULT]
	sasl.kerberos.service.name = null
	sasl.kerberos.ticket.renew.jitter = 0.05
	sasl.kerberos.ticket.renew.window.factor = 0.8
	sasl.login.callback.handler.class = null
	sasl.login.class = null
	sasl.login.refresh.buffer.seconds = 300
	sasl.login.refresh.min.period.seconds = 60
	sasl.login.refresh.window.factor = 0.8
	sasl.login.refresh.window.jitter = 0.05
	sasl.mechanism.inter.broker.protocol = GSSAPI
	sasl.server.callback.handler.class = null
	security.inter.broker.protocol = PLAINTEXT
	security.providers = null
	socket.receive.buffer.bytes = 102400
	socket.request.max.bytes = 104857600
	socket.send.buffer.bytes = 102400
	ssl.cipher.suites = []
	ssl.client.auth = none
	ssl.enabled.protocols = [TLSv1.2]
	ssl.endpoint.identification.algorithm = https
	ssl.engine.factory.class = null
	ssl.key.password = null
	ssl.keymanager.algorithm = SunX509
	ssl.keystore.location = null
	ssl.keystore.password = null
	ssl.keystore.type = JKS
	ssl.principal.mapping.rules = DEFAULT
	ssl.protocol = TLSv1.2
	ssl.provider = null
	ssl.secure.random.implementation = null
	ssl.trustmanager.algorithm = PKIX
	ssl.truststore.location = null
	ssl.truststore.password = null
	ssl.truststore.type = JKS
	transaction.abort.timed.out.transaction.cleanup.interval.ms = 10000
	transaction.max.timeout.ms = 900000
	transaction.remove.expired.transaction.cleanup.interval.ms = 3600000
	transaction.state.log.load.buffer.size = 5242880
	transaction.state.log.min.isr = 1
	transaction.state.log.num.partitions = 50
	transaction.state.log.replication.factor = 1
	transaction.state.log.segment.bytes = 104857600
	transactional.id.expiration.ms = 604800000
	unclean.leader.election.enable = false
	zookeeper.clientCnxnSocket = null
	zookeeper.connect = localhost:2181
	zookeeper.connection.timeout.ms = 18000
	zookeeper.max.in.flight.requests = 10
	zookeeper.session.timeout.ms = 18000
	zookeeper.set.acl = false
	zookeeper.ssl.cipher.suites = null
	zookeeper.ssl.client.enable = false
	zookeeper.ssl.crl.enable = false
	zookeeper.ssl.enabled.protocols = null
	zookeeper.ssl.endpoint.identification.algorithm = HTTPS
	zookeeper.ssl.keystore.location = null
	zookeeper.ssl.keystore.password = null
	zookeeper.ssl.keystore.type = null
	zookeeper.ssl.ocsp.enable = false
	zookeeper.ssl.protocol = TLSv1.2
	zookeeper.ssl.truststore.location = null
	zookeeper.ssl.truststore.password = null
	zookeeper.ssl.truststore.type = null
	zookeeper.sync.time.ms = 2000
 (kafka.server.KafkaConfig)
[2020-10-21 10:12:11,828] INFO KafkaConfig values: 
	advertised.host.name = null
	advertised.listeners = null
	advertised.port = null
	alter.config.policy.class.name = null
	alter.log.dirs.replication.quota.window.num = 11
	alter.log.dirs.replication.quota.window.size.seconds = 1
	authorizer.class.name = 
	auto.create.topics.enable = true
	auto.leader.rebalance.enable = true
	background.threads = 10
	broker.id = 0
	broker.id.generation.enable = true
	broker.rack = null
	client.quota.callback.class = null
	compression.type = producer
	connection.failed.authentication.delay.ms = 100
	connections.max.idle.ms = 600000
	connections.max.reauth.ms = 0
	control.plane.listener.name = null
	controlled.shutdown.enable = true
	controlled.shutdown.max.retries = 3
	controlled.shutdown.retry.backoff.ms = 5000
	controller.socket.timeout.ms = 30000
	create.topic.policy.class.name = null
	default.replication.factor = 1
	delegation.token.expiry.check.interval.ms = 3600000
	delegation.token.expiry.time.ms = 86400000
	delegation.token.master.key = null
	delegation.token.max.lifetime.ms = 604800000
	delete.records.purgatory.purge.interval.requests = 1
	delete.topic.enable = true
	fetch.max.bytes = 57671680
	fetch.purgatory.purge.interval.requests = 1000
	group.initial.rebalance.delay.ms = 0
	group.max.session.timeout.ms = 1800000
	group.max.size = 2147483647
	group.min.session.timeout.ms = 6000
	host.name = 
	inter.broker.listener.name = null
	inter.broker.protocol.version = 2.6-IV0
	kafka.metrics.polling.interval.secs = 10
	kafka.metrics.reporters = []
	leader.imbalance.check.interval.seconds = 300
	leader.imbalance.per.broker.percentage = 10
	listener.security.protocol.map = PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL
	listeners = null
	log.cleaner.backoff.ms = 15000
	log.cleaner.dedupe.buffer.size = 134217728
	log.cleaner.delete.retention.ms = 86400000
	log.cleaner.enable = true
	log.cleaner.io.buffer.load.factor = 0.9
	log.cleaner.io.buffer.size = 524288
	log.cleaner.io.max.bytes.per.second = 1.7976931348623157E308
	log.cleaner.max.compaction.lag.ms = 9223372036854775807
	log.cleaner.min.cleanable.ratio = 0.5
	log.cleaner.min.compaction.lag.ms = 0
	log.cleaner.threads = 1
	log.cleanup.policy = [delete]
	log.dir = /tmp/kafka-logs
	log.dirs = /tmp/kafka-logs
	log.flush.interval.messages = 9223372036854775807
	log.flush.interval.ms = null
	log.flush.offset.checkpoint.interval.ms = 60000
	log.flush.scheduler.interval.ms = 9223372036854775807
	log.flush.start.offset.checkpoint.interval.ms = 60000
	log.index.interval.bytes = 4096
	log.index.size.max.bytes = 10485760
	log.message.downconversion.enable = true
	log.message.format.version = 2.6-IV0
	log.message.timestamp.difference.max.ms = 9223372036854775807
	log.message.timestamp.type = CreateTime
	log.preallocate = false
	log.retention.bytes = -1
	log.retention.check.interval.ms = 300000
	log.retention.hours = 168
	log.retention.minutes = null
	log.retention.ms = null
	log.roll.hours = 168
	log.roll.jitter.hours = 0
	log.roll.jitter.ms = null
	log.roll.ms = null
	log.segment.bytes = 1073741824
	log.segment.delete.delay.ms = 60000
	max.connections = 2147483647
	max.connections.per.ip = 2147483647
	max.connections.per.ip.overrides = 
	max.incremental.fetch.session.cache.slots = 1000
	message.max.bytes = 1048588
	metric.reporters = []
	metrics.num.samples = 2
	metrics.recording.level = INFO
	metrics.sample.window.ms = 30000
	min.insync.replicas = 1
	num.io.threads = 8
	num.network.threads = 3
	num.partitions = 1
	num.recovery.threads.per.data.dir = 1
	num.replica.alter.log.dirs.threads = null
	num.replica.fetchers = 1
	offset.metadata.max.bytes = 4096
	offsets.commit.required.acks = -1
	offsets.commit.timeout.ms = 5000
	offsets.load.buffer.size = 5242880
	offsets.retention.check.interval.ms = 600000
	offsets.retention.minutes = 10080
	offsets.topic.compression.codec = 0
	offsets.topic.num.partitions = 50
	offsets.topic.replication.factor = 1
	offsets.topic.segment.bytes = 104857600
	password.encoder.cipher.algorithm = AES/CBC/PKCS5Padding
	password.encoder.iterations = 4096
	password.encoder.key.length = 128
	password.encoder.keyfactory.algorithm = null
	password.encoder.old.secret = null
	password.encoder.secret = null
	port = 9092
	principal.builder.class = null
	producer.purgatory.purge.interval.requests = 1000
	queued.max.request.bytes = -1
	queued.max.requests = 500
	quota.consumer.default = 9223372036854775807
	quota.producer.default = 9223372036854775807
	quota.window.num = 11
	quota.window.size.seconds = 1
	replica.fetch.backoff.ms = 1000
	replica.fetch.max.bytes = 1048576
	replica.fetch.min.bytes = 1
	replica.fetch.response.max.bytes = 10485760
	replica.fetch.wait.max.ms = 500
	replica.high.watermark.checkpoint.interval.ms = 5000
	replica.lag.time.max.ms = 30000
	replica.selector.class = null
	replica.socket.receive.buffer.bytes = 65536
	replica.socket.timeout.ms = 30000
	replication.quota.window.num = 11
	replication.quota.window.size.seconds = 1
	request.timeout.ms = 30000
	reserved.broker.max.id = 1000
	sasl.client.callback.handler.class = null
	sasl.enabled.mechanisms = [GSSAPI]
	sasl.jaas.config = null
	sasl.kerberos.kinit.cmd = /usr/bin/kinit
	sasl.kerberos.min.time.before.relogin = 60000
	sasl.kerberos.principal.to.local.rules = [DEFAULT]
	sasl.kerberos.service.name = null
	sasl.kerberos.ticket.renew.jitter = 0.05
	sasl.kerberos.ticket.renew.window.factor = 0.8
	sasl.login.callback.handler.class = null
	sasl.login.class = null
	sasl.login.refresh.buffer.seconds = 300
	sasl.login.refresh.min.period.seconds = 60
	sasl.login.refresh.window.factor = 0.8
	sasl.login.refresh.window.jitter = 0.05
	sasl.mechanism.inter.broker.protocol = GSSAPI
	sasl.server.callback.handler.class = null
	security.inter.broker.protocol = PLAINTEXT
	security.providers = null
	socket.receive.buffer.bytes = 102400
	socket.request.max.bytes = 104857600
	socket.send.buffer.bytes = 102400
	ssl.cipher.suites = []
	ssl.client.auth = none
	ssl.enabled.protocols = [TLSv1.2]
	ssl.endpoint.identification.algorithm = https
	ssl.engine.factory.class = null
	ssl.key.password = null
	ssl.keymanager.algorithm = SunX509
	ssl.keystore.location = null
	ssl.keystore.password = null
	ssl.keystore.type = JKS
	ssl.principal.mapping.rules = DEFAULT
	ssl.protocol = TLSv1.2
	ssl.provider = null
	ssl.secure.random.implementation = null
	ssl.trustmanager.algorithm = PKIX
	ssl.truststore.location = null
	ssl.truststore.password = null
	ssl.truststore.type = JKS
	transaction.abort.timed.out.transaction.cleanup.interval.ms = 10000
	transaction.max.timeout.ms = 900000
	transaction.remove.expired.transaction.cleanup.interval.ms = 3600000
	transaction.state.log.load.buffer.size = 5242880
	transaction.state.log.min.isr = 1
	transaction.state.log.num.partitions = 50
	transaction.state.log.replication.factor = 1
	transaction.state.log.segment.bytes = 104857600
	transactional.id.expiration.ms = 604800000
	unclean.leader.election.enable = false
	zookeeper.clientCnxnSocket = null
	zookeeper.connect = localhost:2181
	zookeeper.connection.timeout.ms = 18000
	zookeeper.max.in.flight.requests = 10
	zookeeper.session.timeout.ms = 18000
	zookeeper.set.acl = false
	zookeeper.ssl.cipher.suites = null
	zookeeper.ssl.client.enable = false
	zookeeper.ssl.crl.enable = false
	zookeeper.ssl.enabled.protocols = null
	zookeeper.ssl.endpoint.identification.algorithm = HTTPS
	zookeeper.ssl.keystore.location = null
	zookeeper.ssl.keystore.password = null
	zookeeper.ssl.keystore.type = null
	zookeeper.ssl.ocsp.enable = false
	zookeeper.ssl.protocol = TLSv1.2
	zookeeper.ssl.truststore.location = null
	zookeeper.ssl.truststore.password = null
	zookeeper.ssl.truststore.type = null
	zookeeper.sync.time.ms = 2000
 (kafka.server.KafkaConfig)
[2020-10-21 10:12:11,879] INFO [ThrottledChannelReaper-Fetch]: Starting (kafka.server.ClientQuotaManager$ThrottledChannelReaper)
[2020-10-21 10:12:11,880] INFO [ThrottledChannelReaper-Produce]: Starting (kafka.server.ClientQuotaManager$ThrottledChannelReaper)
[2020-10-21 10:12:11,882] INFO [ThrottledChannelReaper-Request]: Starting (kafka.server.ClientQuotaManager$ThrottledChannelReaper)
[2020-10-21 10:12:11,925] INFO Log directory /tmp/kafka-logs not found, creating it. (kafka.log.LogManager)
[2020-10-21 10:12:11,935] INFO Loading logs from log dirs ArraySeq(/tmp/kafka-logs) (kafka.log.LogManager)
[2020-10-21 10:12:11,937] INFO Attempting recovery for all logs in /tmp/kafka-logs since no clean shutdown file was found (kafka.log.LogManager)
[2020-10-21 10:12:11,944] INFO Loaded 0 logs in 9ms. (kafka.log.LogManager)
[2020-10-21 10:12:11,993] INFO Starting log cleanup with a period of 300000 ms. (kafka.log.LogManager)
[2020-10-21 10:12:12,001] INFO Starting log flusher with a default period of 9223372036854775807 ms. (kafka.log.LogManager)
[2020-10-21 10:12:12,653] INFO Awaiting socket connections on 0.0.0.0:9092. (kafka.network.Acceptor)
[2020-10-21 10:12:12,708] INFO [SocketServer brokerId=0] Created data-plane acceptor and processors for endpoint : ListenerName(PLAINTEXT) (kafka.network.SocketServer)
[2020-10-21 10:12:12,740] INFO [ExpirationReaper-0-Produce]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2020-10-21 10:12:12,740] INFO [ExpirationReaper-0-Fetch]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2020-10-21 10:12:12,741] INFO [ExpirationReaper-0-DeleteRecords]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2020-10-21 10:12:12,742] INFO [ExpirationReaper-0-ElectLeader]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2020-10-21 10:12:12,765] INFO [LogDirFailureHandler]: Starting (kafka.server.ReplicaManager$LogDirFailureHandler)
[2020-10-21 10:12:12,803] INFO Creating /brokers/ids/0 (is it secure? false) (kafka.zk.KafkaZkClient)
[2020-10-21 10:12:12,833] INFO Stat of the created znode at /brokers/ids/0 is: 27,27,1603246332824,1603246332824,1,0,0,72057801536634880,188,0,27
 (kafka.zk.KafkaZkClient)
[2020-10-21 10:12:12,834] INFO Registered broker 0 at path /brokers/ids/0 with addresses: PLAINTEXT://localhost:9092, czxid (broker epoch): 27 (kafka.zk.KafkaZkClient)
[2020-10-21 10:12:12,930] INFO [ExpirationReaper-0-topic]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2020-10-21 10:12:12,937] INFO [ExpirationReaper-0-Heartbeat]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2020-10-21 10:12:12,937] INFO [ExpirationReaper-0-Rebalance]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2020-10-21 10:12:12,941] INFO Successfully created /controller_epoch with initial epoch 0 (kafka.zk.KafkaZkClient)
[2020-10-21 10:12:13,011] INFO [GroupCoordinator 0]: Starting up. (kafka.coordinator.group.GroupCoordinator)
[2020-10-21 10:12:13,018] INFO [GroupCoordinator 0]: Startup complete. (kafka.coordinator.group.GroupCoordinator)
[2020-10-21 10:12:13,021] INFO [GroupMetadataManager brokerId=0] Removed 0 expired offsets in 9 milliseconds. (kafka.coordinator.group.GroupMetadataManager)
[2020-10-21 10:12:13,043] INFO [ProducerId Manager 0]: Acquired new producerId block (brokerId:0,blockStartProducerId:0,blockEndProducerId:999) by writing to Zk with path version 1 (kafka.coordinator.transaction.ProducerIdManager)
[2020-10-21 10:12:13,094] INFO [TransactionCoordinator id=0] Starting up. (kafka.coordinator.transaction.TransactionCoordinator)
[2020-10-21 10:12:13,096] INFO [Transaction Marker Channel Manager 0]: Starting (kafka.coordinator.transaction.TransactionMarkerChannelManager)
[2020-10-21 10:12:13,097] INFO [TransactionCoordinator id=0] Startup complete. (kafka.coordinator.transaction.TransactionCoordinator)
[2020-10-21 10:12:13,145] INFO [ExpirationReaper-0-AlterAcls]: Starting (kafka.server.DelayedOperationPurgatory$ExpiredOperationReaper)
[2020-10-21 10:12:13,164] INFO [/config/changes-event-process-thread]: Starting (kafka.common.ZkNodeChangeNotificationListener$ChangeEventProcessThread)
[2020-10-21 10:12:13,177] INFO [SocketServer brokerId=0] Starting socket server acceptors and processors (kafka.network.SocketServer)
[2020-10-21 10:12:13,185] INFO [SocketServer brokerId=0] Started data-plane acceptor and processor(s) for endpoint : ListenerName(PLAINTEXT) (kafka.network.SocketServer)
[2020-10-21 10:12:13,186] INFO [SocketServer brokerId=0] Started socket server acceptors and processors (kafka.network.SocketServer)
[2020-10-21 10:12:13,209] INFO Kafka version: 2.6.0 (org.apache.kafka.common.utils.AppInfoParser)
[2020-10-21 10:12:13,209] INFO Kafka commitId: 62abe01bee039651 (org.apache.kafka.common.utils.AppInfoParser)
[2020-10-21 10:12:13,209] INFO Kafka startTimeMs: 1603246333186 (org.apache.kafka.common.utils.AppInfoParser)
[2020-10-21 10:12:13,210] INFO [KafkaServer id=0] started (kafka.server.KafkaServer)


zk中数据变化

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

东山富哥

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值