<property>
<name>oozie.hive.defaults</name>
<value>hive-default.xml</value>
</property>
但,经过实际测试,hive-default.xml里的配置项不起作用,需将用到的配置直接放在workflow.xml里
<property>
<name>hive.metastore.local</name>
<value>true</value>
</property>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<!--<value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true</value>-->
<value>jdbc:mysql://192.168.1.100:3306/hive?createDatabaseIfNotExist=true</value>
<!--注:由于每个task在tasktracker上执行,所以不能像hive server上配置成localhost,需改成IP或域名-->
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>username</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>password</value>
</property>
<property>
<name>hive.metastore.warehouse.dir</name>
<value>/user/hive/warehouse</value>
</property>