Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-12868

ADD JAR via sparkSQL JDBC will fail when using a HDFS URL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.0
    • 2.2.0
    • SQL
    • None

    Description

      When trying to add a jar with a HDFS URI, i.E

      ADD JAR hdfs:///tmp/foo.jar
      

      Via the spark sql JDBC interface it will fail with:

      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)
      

      Attachments

        Issue Links

          Activity

            People

              WeiqingYang Weiqing Yang
              tleftwich Trystan Leftwich
              Votes:
              6 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: