HiveServer2 的jdbc方式创建udf的修改(add jar 最好不要使用),否则会造成异常: java.sql.SQLException: Error while processing statement: null

自从Hive0.13.0开始,使用HiveServer2 的jdbc方式创建udf的临时函数的方法由:

 ADD JAR ${HiveUDFJarPath}

    create TEMPORARY function md5  as 'com.hugedata.hive.udf.codec.UDFMd5';

改为:

      create TEMPORARY function md5  as 'com.hugedata.hive.udf.codec.UDFMd5' USING JAR ${HiveUDFJarPath};

万恶的这个修改,让我忙活了大半天。

异常堆栈跟踪信息:

Exception in thread "main" java.sql.SQLException: Error while processing statement: null
at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:120)
at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:108)
at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:233)

原文地址:https://www.cnblogs.com/sixiweb/p/4905567.html