Member since
10-14-2016
2
Posts
0
Kudos Received
0
Solutions
10-17-2016
12:29 PM
Changed to 777 but the result is the same...
... View more
10-14-2016
11:47 PM
Hello, I'm using the latest hortonworks release, plain installation and just created a simple UDF function for Hive: import org.apache.hadoop.hive.ql.exec.Description;
import org.apache.hadoop.hive.ql.exec.UDF;
import org.apache.hadoop.io.DoubleWritable;
@Description (
name="test",
value="returns the sum of two double values",
extended="SELECT test(a, b) from foo limit 1;"
)
public class Test extends UDF {
public DoubleWritable evaluate(DoubleWritable a, DoubleWritable b) {
return new DoubleWritable(a.get() + b.get());
}
} Then created the jar and uploaded to server. Added the jar to hive and created the temporary function: add jar hdfs:/user/myuser/Test-0.0.1-SNAPSHOT.jar;
create temporary function test as 'Test'; *** When I run this function with the "hdfs" user, it works PERFECT. But when I switch to another user (myuser) and do the same procedure above, receive the following error when running the UDF: Error while compiling statement: FAILED: SemanticException [Error 10014]: Line 1:7 Wrong arguments '46.71': No matching method for class Test with (double, double). Possible choices: Any idea why only hdfs user can run this UDF? Thank you very much. Best regards, Rogerio Biondi
... View more
Labels:
- Labels:
-
Apache Hive