配置oozie的数据存储在mysql中
1.在oozie-site.xml文件中添加连接mysql数据库的几个属性项
<property> <name>oozie.service.JPAService.jdbc.driver</name> <value>com.mysql.jdbc.Driver</value> </property> <property> <name>oozie.service.JPAService.jdbc.url</name> <value>jdbc:mysql://bigdata-pro-m01/oozie?createDatabaseIfNotExist=true</value> </property> <property> <name>oozie.service.JPAService.jdbc.username</name> <value>root</value> </property> <property> <name>oozie.service.JPAService.jdbc.password</name> <value>199911</value> </property>
2.拷贝mysql jar包到libext/
cp /opt/modules/hive/lib/mysql-connector-java-5.1.48-bin.jar libext/
3.拷贝mysql jar包到oozie-server/lib目录下
cp /opt/modules/hive/lib/mysql-connector-java-5.1.48-bin.jar oozie-server/lib/
4.运行命令
bin/ooziedb.sh create -sqlfile oozie.sql -run DB Connection
5.查看mysql数据库
mysql> use oozie; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> show tables; +------------------------+ | Tables_in_oozie | +------------------------+ | BUNDLE_ACTIONS | | BUNDLE_JOBS | | COORD_ACTIONS | | COORD_JOBS | | OOZIE_SYS | | OPENJPA_SEQUENCE_TABLE | | SLA_EVENTS | | SLA_REGISTRATION | | SLA_SUMMARY | | VALIDATE_CONN | | WF_ACTIONS | | WF_JOBS | +------------------------+ 12 rows in set (0.00 sec)