HDP的workflow manager使用还是蛮方便的,不过oozie的配置和依赖还是有点麻烦的。
先聊一下oozie hive2节点的操作,这个一般不会有什么问题,按正确流程配好就可以了。
1.正确配好lib
可能出现类似这样的错误:
Error starting action [hive2_1]. ErrorType [FAILED], ErrorCode [EJ001], Message [Could not locate Oozie sharelib]
万一不好,可以把/usr/oozie/share/lib删除,重起oozie服务,让系统恢复自带的lib,/usr/oozie/share/lib/lib_20180628xxxxxx这类目录
2.copy hive-conf.xml
hdfs dfs -put /usr/hdp/current/hive-server2/conf/hive-site.xml /user/oozie/share/lib/lib_20180628161326/hive2/hive-conf.xml
可能出现类似这样的错误:
org.apache.oozie.action.ActionExecutorException: JA008: File does not exist: hdfs://bigdatamster:8020/user/oozie/share/lib/lib_20180628161326/hive2/hive-conf.xml#hive-conf.xml
3.配置hive2的节点
4.实际的调用beeline
由于最初lib没有配置好,碰到了这个错误,
java.lang.NoClassDefFoundError: org/apache/hive/beeline/BeeLine
也知道hive2节点实际使用beeline的命令,具体把lib解决掉就可以了。
--beeline
[hive@bigdatanode0 jdbc]$ beeline
Beeline version 1.2.1000.2.6.4.0-91 by Apache Hive
beeline> !connect jdbc:hive2://bigdatanode0:10000/default
beeline> !connect jdbc:hive2://
Connecting to jdbc:hive2://
Enter username for jdbc:hive2://: admin
Enter password for jdbc:hive2://: **
Connected to: Apache Hive (version 1.2.1000.2.6.4.0-91)
Driver: Hive JDBC (version 1.2.1000.2.6.4.0-91)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://> select count(*) from test02;
18/06/27 14:31:46 [main]: ERROR hdfs.KeyProviderCache: Could not find uri with key [dfs.encryption.key.provider.uri] to create a keyProvider !!