kubernetes-data-platform icon indicating copy to clipboard operation
kubernetes-data-platform copied to clipboard

[Bug]:使用hive自定义UDTF函数时,无法找到依赖包

Open jiujiuya1314 opened this issue 1 year ago • 2 comments

KDP version

1.2

What did you do?

add jar hdfs://ip:port/udf/hive-udtf-1.0-SNAPSHOT-jar-with-dependencies.jar;

-- UDTF函数

create temporary function split_str as 'HiveUDTFSplitStr' using jar 'hdfs://ip:port/udf/hive-udtf-1.0-SNAPSHOT-jar-with-dependencies.jar';

-- 异常查询

with src as ( select col1, col2, col3 from p_table ) select count(1) from (select t., w. from src as t lateral view split_str(t.col1, t.col2, t.col3) w as c1, c2, c3) as t2;

What did you see happen?

执行SQL后报错如下: ERROR: Job failed with Unable to find class: HiveUDTFSplitStr

What did you expect to see?

返回查询结果

jiujiuya1314 avatar Aug 01 '24 09:08 jiujiuya1314

@jiujiuya1314 当前临时解决方案可考虑基于 ltc-spark:v1.1.0-3.3.0-hos 镜像Add 对应的udf jar到 /opt/spark/jars ,重新构建镜像后修改hive-server2 app 配置更新应用

hakeedra avatar Aug 07 '24 08:08 hakeedra

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Oct 07 '24 01:10 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale.

github-actions[bot] avatar Oct 15 '24 01:10 github-actions[bot]