How to find the kafka version in linux

2019-02-01 15:39发布

How to find the kafka version in linux? whether there is a way to find the installed kafka version other than mentioning the version while downloading it?

10条回答
淡お忘
2楼-- · 2019-02-01 15:58

There is nothing like kafka --version at this point. So you should either check the version from your kafka/libs/ folder or you can run

find ./libs/ -name \*kafka_\* | head -1 | grep -o '\kafka[^\n]*'

from your kafka folder (and it will do the same for you). It will return you something like kafka_2.9.2-0.8.1.1.jar.asc where 0.8.1.1 is your kafka version.

查看更多
唯我独甜
3楼-- · 2019-02-01 15:58

Simple way on macOS e.g. installed via homebrew

$ ls -l $(which kafka-topics)
/usr/local/bin/kafka-topics -> ../Cellar/kafka/0.11.0.1/bin/kafka-topics
查看更多
Explosion°爆炸
4楼-- · 2019-02-01 15:59

There are several methods to find kafka version

Method 1 simple:-

ps -ef|grep kafka

it will displays all running kafka clients in the console... Ex:- /usr/hdp/current/kafka-broker/bin/../libs/kafka-clients-0.10.0.2.5.3.0-37.jar we are using 0.10.0.2.5.3.0-37 version of kafka

Method 2:- go to

cd /usr/hdp/current/kafka-broker/libs
ll |grep kafka

Ex:- kafka_2.10-0.10.0.2.5.3.0-37.jar kafka-clients-0.10.0.2.5.3.0-37.jar

same result as method 1 we can find the version of kafka using in kafka libs.

查看更多
时光不老,我们不散
5楼-- · 2019-02-01 16:09

When you install Kafka in Centos7 with confluent :

yum install confluent-platform-oss-2.11

You can see the version of Kafka with :

yum deplist confluent-platform-oss-2.11

You can read : confluent-kafka-2.11 >= 0.10.2.1

查看更多
老娘就宠你
6楼-- · 2019-02-01 16:11

You can also type

cat /build.info

This will give you an output like this

BUILD_BRANCH=master
BUILD_COMMIT=434160726dacc4a1a592fe6036891d6e646a3a4a
BUILD_TIME=2017-05-12T16:02:04Z
DOCKER_REPO=index.docker.io/landoop/fast-data-dev
KAFKA_VERSION=0.10.2.1
CP_VERSION=3.2.1
查看更多
The star\"
7楼-- · 2019-02-01 16:13

You can grep the logs to see the version. Let's say kafka is installed under /usr/local/kafka, then:

$ grep "Kafka version" /usr/local/kafka/logs/*

/usr/local/kafka/logs/kafkaServer.out: INFO Kafka version : 0.9.0.1 (org.apache.kafka.common.utils.AppInfoParser)

will reveal the version

查看更多
登录 后发表回答