JAVA如何连接Hive

pom.xml


<dependency>
    <groupId>org.apache.hadoopgroupId>
    <artifactId>hadoop-commonartifactId>
    <version>2.7.3version>
dependency>

<dependency>
    <groupId>org.apache.hadoopgroupId>
    <artifactId>hadoop-coreartifactId>
    <version>1.2.1version>
dependency>

<dependency>
    <groupId>org.apache.hivegroupId>
    <artifactId>hive-jdbcartifactId>
    <version>2.1.0version>
dependency>

Application.yml

spring:
  datasource:
  	driver-class-name: org.apache.hive.jdbc.HiveDriver
  	url: jdbc:hive2://127.0.0.1:10000/test
  	username: test
  	password: test

你可能感兴趣的:(数据库,大后端,hive)