Reputation: 45
Here I have written one simple replace word UDF in java.
Then I have exported that .java file and created jar file.
Same created jar file added in hive using
Add jar jar file path ;
then I am trying to create temporary function in hive but getting below error
create temporary function functionname as 'javaprogrampkgname.javaprogramname.';
but for this am getting below error on terminal:
FAILED: Execution Error, return code -101 from org.apache.hadoop.hive.ql.exec.FunctionTask. ReplaceUDFpkg/ReplaceUDF : Unsupported major.minor version 52.0
Upvotes: 0
Views: 1201
Reputation: 45
Finally got the cause of this error.
Yes, this error due to java version mismatch but as:
I have written, compiled and exported as JAR in eclipse and then this exported JAR trying to use in a different version of java, here due to version mismatch the JVM could not able to call and find this JAR.
I have solved this issue by compiling my java code and creating JAR in "1.7" version which set for my Hadoop home path.
Upvotes: 1
Reputation: 106
It should be the error of your different java version on the place where you created UDF and your hive java version.
Upvotes: 0