Spark 1.6的IllegalArgumentException

时间:2016-10-05 07:30:08

标签: apache-spark

我在CDH 5.7上运行Spark 1.6.0,并且我已将原始应用程序从1.4.1升级到1.6.0。当我尝试运行我的应用程序(以前工作正常)时,我收到以下错误:

Exception in thread "main" java.lang.IllegalArgumentException: requirement failed
        at scala.Predef$.require(Predef.scala:221)
        at org.apache.spark.deploy.yarn.Client$$anonfun$prepareLocalResources$6$$anonfun$apply$3.apply(Client.scala:473)
        at org.apache.spark.deploy.yarn.Client$$anonfun$prepareLocalResources$6$$anonfun$apply$3.apply(Client.scala:471)
        at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
        at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:108)
        at org.apache.spark.deploy.yarn.Client$$anonfun$prepareLocalResources$6.apply(Client.scala:471)
        at org.apache.spark.deploy.yarn.Client$$anonfun$prepareLocalResources$6.apply(Client.scala:469)
        at scala.collection.immutable.List.foreach(List.scala:318)
        at org.apache.spark.deploy.yarn.Client.prepareLocalResources(Client.scala:469)
        at org.apache.spark.deploy.yarn.Client.createContainerLaunchContext(Client.scala:725)
        at org.apache.spark.deploy.yarn.Client.submitApplication(Client.scala:143)
        at org.apache.spark.deploy.yarn.Client.run(Client.scala:1023)
        at org.apache.spark.deploy.yarn.Client$.main(Client.scala:1083)
        at org.apache.spark.deploy.yarn.Client.main(Client.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:731)
        at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:181)
        at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:206)
        at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:121)
        at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

我提交申请表:

  • --jars是以逗号分隔的jar列表(带有绝对路径)
  • --files是以逗号分隔的文件列表(带有绝对路径)
  • --driver-class-path是以冒号分隔的资源列表(没有完整路径,只有文件名)

我已尝试使用驱动程序(和执行程序)类路径的完整路径,但这给了我同样的问题。随应用提交的所有文件和罐子都存在,我查了一下。

这可能与duplicates in the distributed cache的问题有关,还是另一个问题?

从源代码中我看到,require没有自定义消息(如堆栈跟踪中)的唯一调用与distribute()方法有关。如果是这样,如何在不升级Spark的情况下运行应用程序?

1 个答案:

答案 0 :(得分:0)

这是异常,这是因为在--files选项的参数中出现两次相同的路径/ URI。