When connecting to Hadoop cluster, how can I know which version of Hadoop this cluster is running? In particular this is important for proper configuration of libraries when compiling and packaging Hadoop Java jobs with Maven.
Asked
Active
Viewed 3.3k times
4 Answers
32
The simplest way if you have ssh access to hadoop node is by running command
$ hadoop version

Vladimir Kroz
- 5,237
- 6
- 39
- 50
17
If you are looking for CDH version then check /usr/lib/hadoop/cloudera/cdh_version.properties

Harinder
- 11,776
- 16
- 70
- 126
5
In cdh, in the cluster I am using, there is not any cdh_version.properties (or I couldn't find it)
If your cluster uses "Parcels", you could check which version of cdh is used by doing:
/opt/cloudera/parcels
And you could see the version as the name of the folder:
CDH-5.5.1-1.cdh5.5.1.p0.11
Note: I know that this is a not a general rule for getting which cdh version is used. I am trying to show an alternative way that it worked to me.

evinhas
- 179
- 1
- 4
-
A straighforward fashion: run "hadoop version" and you can check the version of CDH – evinhas Oct 19 '17 at 15:18
3
We can check the installed version with the help of following command:
cat /usr/lib/hadoop/cloudera/cdh_version.properties
Hope this may help you.

Irshad
- 3,071
- 5
- 30
- 51

Anoop Saxena
- 41
- 4