Where is the port number defined, which is used in JDBC hive connection string? Where is the port number defined, which is used in JDBC hive connection string? hadoop hadoop

Where is the port number defined, which is used in JDBC hive connection string?


You can find all the hive related configuration details under Hive installation directory. File name is hive-site.xml like in my case file is present under this path /usr/hdp/current/hive-server2/conf

There is a parameter defined with the name hive.server2.thrift.port in hive-site.xml file

<property>      <name>hive.server2.thrift.port</name>      <value>10000</value> </property>


It, usually, is defined in hive configuration file, hive-site.xml. Check for the property hive.server2.thrift.port. Default value is 10000.


Adding to the above answers, you dont even have to struggle searching for hive-site.xml, once you open your HiveCLI, just type in below property.

hive> set hive.server2.thrift.port;

it should give you the hiveserver2 port number.

hive.server2.thrift.port=10000

If you want to change the port number by setting the property in hive CLI

set hive.server2.thrift.port=10014;

These properties are maintained in hive-site.xml(Conf directory) which is located in the location where Hive is installed.