Hive的UDF开发踩过的那些坑儿

hive创建的udf函数,我™好气,日志信息报错都不正常,坑了宝宝大半天排查问题

日志截图如下:

开始执行sql:set role admin
开始执行sql:reload function
开始执行sql:select test_encode_001("datatype_01","ceshi")
任务-T_6013577427031285_20190813164922075_1_1 运行失败,失败原因:org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 10014]: Line 1:7 Wrong arguments ''ceshi'': org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method public java.lang.String com.vanke.encode.EncodeApiUDF.evaluate(java.lang.String,java.lang.String)  on object com.vanke.encode.EncodeApiUDF@51b473b3 of class com.vanke.encode.EncodeApiUDF with arguments {datatype_01:java.lang.String, ceshi:java.lang.String} of size 2
	at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:258)
	at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:244)
	at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:248)
	at org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:379)
	at com.dtwave.dipper.dubhe.node.executor.runner.impl.Hive2TaskRunner.doRun(Hive2TaskRunner.java:244)
	at com.dtwave.dipper.dubhe.node.executor.runner.BasicTaskRunner.execute(BasicTaskRunner.java:100)
	at com.dtwave.dipper.dubhe.node.executor.TaskExecutor.run(TaskExecutor.java:32)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: SemanticException [Error 10014]: Line 1:7 Wrong arguments ''ceshi'': org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method public java.lang.String com.vanke.encode.EncodeApiUDF.evaluate(java.lang.String,java.lang.String)  on object com.vanke.encode.EncodeApiUDF@51b473b3 of class com.vanke.encode.EncodeApiUDF with arguments {datatype_01:java.lang.String, ceshi:java.lang.String} of size 2
	at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:114)
	at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:216)
	at org.apache.hive.service.cli.operation.Operation.run(Operation.java:292)
	at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:430)
	at org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:417)
	at sun.reflect.GeneratedMethodAccessor59.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:78)
	at org.apache.hive.service.cli.session.HiveSessionProxy.access
  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

MrZhangBaby

请博主喝杯奶茶

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值