Hive JDBC connection setting or mapping with MySQL

早过忘川 提交于 2019-12-24 22:49:47

问题


I am new to big data; technically I am a Java developer and decided to learn big data concepts. I am just able to install Hadoop and Hive, and now I want to connect my Java program to Hive. I have configured MySQL as a back-end db.

Tried to Google it and found a few Java program sample where they are using something like this URL jdbc:hive2://172.16.149.158:10000/default,"","".

My question is I didn't made any setting like this in hive-sites.xml. Where should I made these setting or if not than where to find out which setting I should use?


回答1:


Port 10000 is the default port for HiveServer2, which enables clients to execute queries against Hive.

This configuration is set in hive-site.xml via the property hive.server2.thrift.port

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

More details on HiveServer2 are here

Also, the default in the URL is the default Hive database.



来源:https://stackoverflow.com/questions/50073794/hive-jdbc-connection-setting-or-mapping-with-mysql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!