Member since
06-06-2017
1
Post
0
Kudos Received
0
Solutions
06-06-2017
06:54 AM
Hey, We create the udf function in hive: 1) hdfs dfs -put /tmp/changeFormatDate-0.0.1.jar /data/changeFormatDate-0.0.1.jar 2) With Sentry enabled, grant privilege to the JAR on HDFS: create role role_udfs; GRANT ALL ON URI 'hdfs:///data/changeFormatDate-0.0.1.jar' TO ROLE role_udfs; grant role role_udfs to group hive; Detail in changeFormatDate-0.0.1.jar META-INF/ META-INF/MANIFEST.MF com/ com/ag2rlm/ com/ag2rlm/udfs/ com/ag2rlm/udfs/ChangeFormatDate.class META-INF/maven/ META-INF/maven/com.ag2rlm/ META-INF/maven/com.ag2rlm/changeFormatDate/ META-INF/maven/com.ag2rlm/changeFormatDate/pom.xml META-INF/maven/com.ag2rlm/changeFormatDate/pom.properties Class heading package com.ag2rlm.udfs; ..... public class ChangeFormatDate extends UDF ..... 3) create function with hdfs CREATE FUNCTION CHANGE_FORMAT_DATE AS 'com.ag2rlm.udfs.ChangeFormatDate'; output error : Error while compiling statement: FAILED: SemanticException Error retrieving udf class:com.ag2rlm.udfs.ChangeFormatDate Can you help me on this problem ? Best regards,
... View more
Labels:
- Labels:
-
Apache Hive