1、新建配置文件hive-site.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:oracle:thin:@localhost:1521:test</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>oracle.jdbc.OracleDriver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>用户名</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>密码</value>
</property>
</configuration>
2、增加 jar 包
- hadoop3.1.3的jar包guava-27.0-jre.jar,同步到hive的lib下
- 下载好oracle驱动包ojdbc8-12.2.0.1.jar,上传到hive的lib下
3、执行初始化命令
sh schematool -dbType oracle -initSchema
标签:初始化,jdo,option,jar,Hive3.1,hive,oracle,Oracle,javax
From: https://blog.csdn.net/tsstep/article/details/142702991