Find Port Number and Domain Name to connect to Hive Table Find Port Number and Domain Name to connect to Hive Table unix unix

Find Port Number and Domain Name to connect to Hive Table


If you are able to login to hiveCLI, you just have to execute below property.

hive> set hive.server2.thrift.port;

It should give you the port number where hiveserver2 is running. It looks something like below.

hive.server2.thrift.port=10014


Posting this after quite some time. I did not get lsof command. So used this workaround.

If you have hive access:

hive> set hive.metastore.uris;hive.metastore.uris=thrift://sandbox.hortonworks.com:9083


If you know the host and can logon: try

/usr/sbin/lsof -i