我已阅读this question,但答案对我没有帮助。
我已使用文件的完整路径添加了必要的jar文件joda-time-2.2.jar
。 Hive中的函数需要此文件。然后尝试在Hive中使用函数我在标题中收到错误。
尽管添加了jar,但我收到了错误:
add jar /path/to/the/scripts/joda-time-2.2.jar;
hive> list jars;
/path/te/the/scripts/joda-time-2.2.jar
奇怪有时会发生此错误,因此我可以成功执行该功能。但是这个错误主要是因为我被错误信息抛出了hive。
我尝试了joda-time-2.2.jar
文件的不同版本,但没有成功。
有人可以帮助我吗?
P.S .: 我使用的lib是brickhouse。完整的代码是:
add jar /path/te/the/scripts/brickhouse-0.6.0-sources.jar;
add jar /path/te/the/scripts/joda-time-2.2.jar
CREATE TEMPORARY FUNCTION from_json AS 'brickhouse.udf.json.FromJsonUDF';
select from_json('{"key1":"value1","key2":"value2","key3":"value3","key4":[["0","1","nnn"],["1","3","mmm"],["1","3","ggg"],["1","5","kkk"],["4","5","ppp"]]}', 'map<string,string>') from my_table;
答案 0 :(得分:-2)
您应该像这样添加罐子:
添加jar /path/te/the/scripts/joda-time-2.2.jar;
添加jar /path/te/the/scripts/brickhouse-0.6.0-sources.jar;