sandeep-katta commented on issue #25399: [SPARK-28670][SQL] create function 
should thrown Exception if the resource is not found
URL: https://github.com/apache/spark/pull/25399#issuecomment-520306332
 
 
   **Hive** 
   
   In both (temporary and permanent) the cases query execution fails
   
   **case i: temporary function**
   
   jdbc:hive2://vm1:21066/> create temporary function addm AS 
'com.huawei.bigdata.hive.example.udf.AddDoublesUDF' using jar 
'hdfs://hacluster/user/AddDoublesUDF1.jar';
   INFO  : Executing 
command(queryId=omm_20190812133851_e58dd117-e8b1-40b6-8659-5ad14eddfdd6): 
create temporary function addm AS 
'com.huawei.bigdata.hive.example.udf.AddDoublesUDF' using jar 
'hdfs://hacluster/user/AddDoublesUDF1.jar'--0; Current 
sessionId=dcdc1020-3f73-4af2-95db-e834abda2020
   **ERROR : File does not exist: hdfs://hacluster/user/AddDoublesUDF1.jar**
   Error: Error while processing statement: FAILED: Execution Error, return 
code -101 from **org.apache.hadoop.hive.ql.exec.FunctionTask. 
java.io.FileNotFoundException:** File does not exist: 
hdfs://hacluster/user/AddDoublesUDF1.jar (state=08S01,code=-101)
   
   **case ii: Permanent function**
   
   jdbc:hive2://vm1:21066/> create function addm AS 
'com.huawei.bigdata.hive.example.udf.AddDoublesUDF' using jar 
'hdfs://hacluster/user/AddDoublesUDF1.jar';
   INFO  : Executing 
command(queryId=omm_20190812133902_54e39039-b678-493e-93c2-8c09ce5bcfc0): 
create function addm AS 'com.huawei.bigdata.hive.example.udf.AddDoublesUDF' 
using jar 'hdfs://hacluster/user/AddDoublesUDF1.jar'--0; Current 
sessionId=dcdc1020-3f73-4af2-95db-e834abda2020
   INFO  : Starting task [Stage-0:FUNC] in serial mode
   **ERROR : File does not exist: hdfs://hacluster/user/AddDoublesUDF1.jar**
   ERROR : Failed to register default.addm using class 
com.huawei.bigdata.hive.example.udf.AddDoublesUDF
   Error: Error while processing statement: FAILED: Execution Error, return 
code 1 from org.apache.hadoop.hive.ql.exec.FunctionTask (state=08S01,code=1)
   
   **Presto:**
   As per presto there is no such temporary or permanent function concept, user 
needs to implement the UDF as plugin and put in the plugin folder and restart 
presto server.
   
   details about presto UDF are 
[here](https://www.qubole.com/blog/plugging-in-presto-udfs/)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to