Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
1.11.1
-
None
-
HDP版本:2.4.2.0-258
Hive版本:1.2.1
Flink版本:1.11.1
Flink-sql-client配置见附件:sql-client-defaults.yaml
Flink jobmanager 启动模式:yarn-session模式
Flink lib目录已经按官方文档添加如下jar包:
-rw-r--r-- 1 root root 130802 Aug 10 20:09 aircompressor-0.8.jar -rw-r--r-- 1 root root 90782 Jul 15 17:24 flink-csv-1.11.1.jar -rw-r--r-- 1 root root 108350618 Jul 15 17:30 flink-dist_2.11-1.11.1.jar -rw-r--r-- 1 root root 80837 Aug 10 19:41 flink-hadoop-compatibility_2.11-1.11.1.jar -rw-r--r-- 1 root root 94865 Jul 15 17:24 flink-json-1.11.1.jar -rw-r--r-- 1 root root 36309656 Aug 11 20:11 flink-shaded-hadoop-2-uber-2.6.5-10.0.jar -rw-r--r-- 1 root root 7712156 Jun 18 10:42 flink-shaded-zookeeper-3.4.14.jar -rw-r--r-- 1 root root 31714606 Aug 10 15:13 flink-sql-connector-hive-1.2.2_2.11-1.11.0.jar -rw-r--r-- 1 root root 3541642 Aug 10 15:12 flink-sql-connector-kafka_2.11-1.11.0.jar -rw-r--r-- 1 root root 2100826 Aug 10 17:13 flink-sql-orc_2.11-1.11.0.jar -rw-r--r-- 1 root root 33327194 Jul 15 17:28 flink-table_2.11-1.11.1.jar -rw-r--r-- 1 root root 37331759 Jul 15 17:28 flink-table-blink_2.11-1.11.1.jar -rw-r--r-- 1 root root 20599029 Aug 11 22:17 hive-exec-1.2.1.jar lrwxrwxrwx 1 root root 69 Aug 10 17:15 hive-metastore-1.2.1000.2.4.2.0-258.jar -> /usr/hdp/2.4.2.0-258/hive/lib/hive-metastore-1.2.1000.2.4.2.0-258.jar -rw-r--r-- 1 root root 918379 Aug 11 22:32 hive-serde-1.2.1000.2.4.2.0-258.jar lrwxrwxrwx 1 root root 51 Aug 10 00:19 jersey-core-1.9.jar -> /usr/hdp/2.4.2.0-258/hadoop/lib/jersey-core-1.9.jar lrwxrwxrwx 1 root root 48 Aug 10 17:17 libfb303-0.9.2.jar -> /usr/hdp/2.4.2.0-258/hive/lib/libfb303-0.9.2.jar -rw-r--r-- 1 root root 67114 Apr 20 20:47 log4j-1.2-api-2.12.1.jar -rw-r--r-- 1 root root 276771 Apr 20 20:47 log4j-api-2.12.1.jar -rw-r--r-- 1 root root 1674433 Apr 20 20:47 log4j-core-2.12.1.jar -rw-r--r-- 1 root root 23518 Apr 20 20:47 log4j-slf4j-impl-2.12.1.jar -rw-r--r-- 1 root root 733071 Aug 10 20:09 orc-core-1.4.3.jar
HDP版本:2.4.2.0-258 Hive版本:1.2.1 Flink版本:1.11.1 Flink-sql-client配置见附件: sql-client-defaults.yaml Flink jobmanager 启动模式:yarn-session模式 Flink lib目录已经按官方文档添加如下jar包: -rw-r--r-- 1 root root 130802 Aug 10 20:09 aircompressor-0.8.jar -rw-r--r-- 1 root root 90782 Jul 15 17:24 flink-csv-1.11.1.jar -rw-r--r-- 1 root root 108350618 Jul 15 17:30 flink-dist_2.11-1.11.1.jar -rw-r--r-- 1 root root 80837 Aug 10 19:41 flink-hadoop-compatibility_2.11-1.11.1.jar -rw-r--r-- 1 root root 94865 Jul 15 17:24 flink-json-1.11.1.jar -rw-r--r-- 1 root root 36309656 Aug 11 20:11 flink-shaded-hadoop-2-uber-2.6.5-10.0.jar -rw-r--r-- 1 root root 7712156 Jun 18 10:42 flink-shaded-zookeeper-3.4.14.jar -rw-r--r-- 1 root root 31714606 Aug 10 15:13 flink-sql-connector-hive-1.2.2_2.11-1.11.0.jar -rw-r--r-- 1 root root 3541642 Aug 10 15:12 flink-sql-connector-kafka_2.11-1.11.0.jar -rw-r--r-- 1 root root 2100826 Aug 10 17:13 flink-sql-orc_2.11-1.11.0.jar -rw-r--r-- 1 root root 33327194 Jul 15 17:28 flink-table_2.11-1.11.1.jar -rw-r--r-- 1 root root 37331759 Jul 15 17:28 flink-table-blink_2.11-1.11.1.jar -rw-r--r-- 1 root root 20599029 Aug 11 22:17 hive-exec-1.2.1.jar lrwxrwxrwx 1 root root 69 Aug 10 17:15 hive-metastore-1.2.1000.2.4.2.0-258.jar -> /usr/hdp/2.4.2.0-258/hive/lib/hive-metastore-1.2.1000.2.4.2.0-258.jar -rw-r--r-- 1 root root 918379 Aug 11 22:32 hive-serde-1.2.1000.2.4.2.0-258.jar lrwxrwxrwx 1 root root 51 Aug 10 00:19 jersey-core-1.9.jar -> /usr/hdp/2.4.2.0-258/hadoop/lib/jersey-core-1.9.jar lrwxrwxrwx 1 root root 48 Aug 10 17:17 libfb303-0.9.2.jar -> /usr/hdp/2.4.2.0-258/hive/lib/libfb303-0.9.2.jar -rw-r--r-- 1 root root 67114 Apr 20 20:47 log4j-1.2-api-2.12.1.jar -rw-r--r-- 1 root root 276771 Apr 20 20:47 log4j-api-2.12.1.jar -rw-r--r-- 1 root root 1674433 Apr 20 20:47 log4j-core-2.12.1.jar -rw-r--r-- 1 root root 23518 Apr 20 20:47 log4j-slf4j-impl-2.12.1.jar -rw-r--r-- 1 root root 733071 Aug 10 20:09 orc-core-1.4.3.jar
Description
【问题描述】
我在HDP集群上部署了一套Flink on YARN,并且根据官方文档在Flink SQL上集成Hive,集成后发现Hive内置的部分时间函数使用报错(其他函数使用正常),详细如下:
报错函数:current_date,current_timestamp
详细报错堆栈见附件:flink-sql-client.log
【问题分析】
1.对current_date函数报错堆栈log的分析,发现产生NullPointerException的代码行为GenericUDFCurrentDate.java:52
2.查阅Hive源码:
怀疑是SessionState对象在Flink-sql-client中没有初始化而产生的NullPointerException。由于本人知识水平有限,没办法再深入分析其报错原因,麻烦社区帮忙确认并给出修复建议哈。
Attachments
Attachments
Issue Links
- is related to
-
FLINK-16688 Hive-connector should set SessionState for hive
- Open