[ 
https://issues.apache.org/jira/browse/SPARK-12868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16049814#comment-16049814
 ] 

Dayou Zhou commented on SPARK-12868:
------------------------------------

Hi [~tleftwich] and all,
I was using Spark 2.0 and when I tried to invoke Hive UDTF, I got the following 
error:

Undefined function: '...'. This function is neither a registered temporary 
function nor a permanent function registered in the database 'default'.; 

Then I picked up Spark 2.2 with this fix and the above error went away, which 
is good.  However, when I tried to create new UDTFs and invoke them, I again 
ran into the above error.  Any idea why?  Any help appreciated.

> ADD JAR via sparkSQL JDBC will fail when using a HDFS URL
> ---------------------------------------------------------
>
>                 Key: SPARK-12868
>                 URL: https://issues.apache.org/jira/browse/SPARK-12868
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.6.0
>            Reporter: Trystan Leftwich
>            Assignee: Weiqing Yang
>             Fix For: 2.2.0
>
>
> When trying to add a jar with a HDFS URI, i.E
> {code:sql}
> ADD JAR hdfs:///tmp/foo.jar
> {code}
> Via the spark sql JDBC interface it will fail with:
> {code:sql}
> java.net.MalformedURLException: unknown protocol: hdfs
>         at java.net.URL.<init>(URL.java:593)
>         at java.net.URL.<init>(URL.java:483)
>         at java.net.URL.<init>(URL.java:432)
>         at java.net.URI.toURL(URI.java:1089)
>         at 
> org.apache.spark.sql.hive.client.ClientWrapper.addJar(ClientWrapper.scala:578)
>         at org.apache.spark.sql.hive.HiveContext.addJar(HiveContext.scala:652)
>         at org.apache.spark.sql.hive.execution.AddJar.run(commands.scala:89)
>         at 
> org.apache.spark.sql.execution.ExecutedCommand.sideEffectResult$lzycompute(commands.scala:58)
>         at 
> org.apache.spark.sql.execution.ExecutedCommand.sideEffectResult(commands.scala:56)
>         at 
> org.apache.spark.sql.execution.ExecutedCommand.doExecute(commands.scala:70)
>         at 
> org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$5.apply(SparkPlan.scala:132)
>         at 
> org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$5.apply(SparkPlan.scala:130)
>         at 
> org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:150)
>         at 
> org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:130)
>         at 
> org.apache.spark.sql.execution.QueryExecution.toRdd$lzycompute(QueryExecution.scala:55)
>         at 
> org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:55)
>         at org.apache.spark.sql.DataFrame.<init>(DataFrame.scala:145)
>         at org.apache.spark.sql.DataFrame.<init>(DataFrame.scala:130)
>         at org.apache.spark.sql.DataFrame$.apply(DataFrame.scala:52)
>         at org.apache.spark.sql.SQLContext.sql(SQLContext.scala:817)
>         at 
> org.apache.spark.sql.hive.thriftserver.SparkExecuteStatementOperation.org$apache$spark$sql$hive$thriftserver$SparkExecuteStatementOperation$$execute(SparkExecuteStatementOperation.scala:211)
>         at 
> org.apache.spark.sql.hive.thriftserver.SparkExecuteStatementOperation$$anon$1$$anon$2.run(SparkExecuteStatementOperation.scala:154)
>         at 
> org.apache.spark.sql.hive.thriftserver.SparkExecuteStatementOperation$$anon$1$$anon$2.run(SparkExecuteStatementOperation.scala:151)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.Subject.doAs(Subject.java:422)
>         at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1628)
>         at 
> org.apache.spark.sql.hive.thriftserver.SparkExecuteStatementOperation$$anon$1.run(SparkExecuteStatementOperation.scala:164)
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>         at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to