Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to know Hive and Hadoop versions from command prompt?

Tags:

hadoop

hive

How can I find which Hive version I am using from the command prompt. Below is the details-

I am using Putty to connect to hive table and access records in the tables. So what I did is- I opened Putty and in the host name I typed- leo-ingesting.vip.name.com and then I click Open. And then I entered my username and password and then few commands to get to Hive sql. Below is the list what I did

$ bash bash-3.00$ hive Hive history file=/tmp/rkost/hive_job_log_rkost_201207010451_1212680168.txt hive> set mapred.job.queue.name=hdmi-technology; hive> select * from table LIMIT 1; 

So is there any way from the command prompt I can find which hive version I am using and Hadoop version too?

like image 836
arsenal Avatar asked Jul 02 '12 23:07

arsenal


People also ask

How do I find hive version in hive CLI?

$ bash bash-3.00$ hive Hive history file=/tmp/rkost/hive_job_log_rkost_201207010451_1212680168.

What is the command to check Hadoop version?

Using HDFS command line is one of the best way to get the detailed version. Using HDP Select command on the host where you want to check the version.


2 Answers

$ hive --version Hive version 0.8.1.3 

EDIT: added another '-' before the version. Doesn't work for newer versions. Hope it works for all now.

Known to work in the following distributions:

  • HortonWorks distribution: $ hive --version Hive 0.14.0.2.2.0.0-2041
  • CDH 5.3

It does not work:

  • CDH 4.3
  • HDinsight (Azure)
like image 163
dfrankow Avatar answered Sep 21 '22 02:09

dfrankow


$ hadoop version Hadoop 0.20.2-cdh3u4 

Not sure you can get the Hive version from the command line, though. Maybe you could use something like the hive.hwi.war.file property or pull it out of the classpath, though.

like image 36
Dave Newton Avatar answered Sep 18 '22 02:09

Dave Newton