简体   繁体   English

通过--config时,火花提交失败

[英]Spark-submit fails while passing --config

I am trying to pass config information to Spark in Amazon EMR as below 我正在尝试将配置信息传递给Amazon EMR中的Spark,如下所示

spark-submit --jars "/home/hadoop/transfer_cluster/run_spark/spark_jars/jars/trove-3.0.2.jar" --class SparkPTE bin/pte_sc.jar arabic_undirected -–conf spark.yarn.nodemanager.vmem-check-enabled=false

But i am getting the below error as spark cannot parse my config information. 但是我收到以下错误,因为spark无法解析我的配置信息。

18/04/06 07:48:22 INFO YarnClientSchedulerBackend: SchedulerBackend is ready for scheduling beginning after reached minRegisteredResourcesRatio: 0.8
Exception in thread "main" java.lang.NumberFormatException: For input string: "-–conf"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:580)
    at java.lang.Integer.parseInt(Integer.java:615)
    at SparkPTE.sparkContext(SparkPTE.java:91)
    at SparkPTE.main(SparkPTE.java:79)
    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:775)
    at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)
    at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)
    at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:119)
    at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

If i give --config before --jar i get the below error. 如果我在--jar之前给出--config,则会出现以下错误。

spark-submit -–conf spark.yarn.nodemanager.vmem-check-enabled=false --jars "/home/hadoop/transfer_cluster/run_spark/spark_jars/jars/trove-3.0.2.jar" --class SparkPTE bin/pte_sc.jar arabic_undirected


Error: Unrecognized option: -–conf

The below worked for me 下面为我​​工作

spark-submit --conf spark.yarn.nodemanager.vmem-check-enabled=false --jars "/home/hadoop/transfer_cluster/run_spark/spark_jars/jars/trove-3.0.2.jar" --class SparkPTE bin/pte_sc.jar arabic_undirected

You need to provide the --conf option before your jar name which you're trying to run. 您需要在要运行的jar名称之前提供--conf选项。 This is because whatever you write after your jar name would go as arguments to that jar. 这是因为您在jar名称之后写的任何内容都将作为该jar的参数。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 spark-submit:传递java属性文件给出FileNotFoundException - spark-submit: Passing java properties file gives FileNotFoundException 无法通过Scala将应用程序参数传递给spark-submit - Trouble passing application argument to spark-submit with scala 火花提交和火花壳不起作用 - spark-submit & spark-shell not working 如何激发提交Spark Streaming应用程序 - How to spark-submit a Spark Streaming application 将 jars 添加到 Spark 作业 - spark-submit - Adding jars to a Spark Job - spark-submit 本地 microK8 的 Kubernetes 集群上的 spark-submit 失败:java.security.cert.CertPathValidatorException - spark-submit on local microK8's Kubernetes cluster fails with: java.security.cert.CertPathValidatorException pyspark hiveContext 错误,同时执行 spark-submit 应用程序到纱线和远程 CDH kerberized env - pyspark hiveContext error while executing spark-submit application to yarn and remote CDH kerberized env “文件名,目录名称或卷标语法不正确。”使用spark-submit时 - “The filename, directory name, or volume label syntax is incorrect.” while using spark-submit spark-submit 找不到类(类包含在 jar 中) - spark-submit does not find class (while class is being contained in jar) HDInsight-Spark(提交火花)失败-java.lang.NoSuchMethodError:com.microsoft.azure.storage.blob.CloudBlockBlob.startCopy - HDInsight-Spark (spark-submit) fails - java.lang.NoSuchMethodError: com.microsoft.azure.storage.blob.CloudBlockBlob.startCopy
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM