A master URL must be set in your configuration問題解決方案

來源:互聯網
上載者:User

標籤:ext   com   ade   erro   stat   app   running   lang   with   

 1 Using Spark‘s default log4j profile: org/apache/spark/log4j-defaults.properties 2 16/10/21 18:13:00 INFO SparkContext: Running Spark version 2.0.0 3 16/10/21 18:13:02 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 4 16/10/21 18:13:04 ERROR SparkContext: Error initializing SparkContext. 5 org.apache.spark.SparkException: A master URL must be set in your configuration 6     at org.apache.spark.SparkContext.<init>(SparkContext.scala:371) 7     at SummaryStatisticsExample$.main(SummaryStatisticsExample.scala:17) 8     at SummaryStatisticsExample.main(SummaryStatisticsExample.scala) 9     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)10     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)11     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)12     at java.lang.reflect.Method.invoke(Method.java:606)13     at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)14 16/10/21 18:13:04 INFO SparkContext: Successfully stopped SparkContext15 Exception in thread "main" org.apache.spark.SparkException: A master URL must be set in your configuration16     at org.apache.spark.SparkContext.<init>(SparkContext.scala:371)17     at SummaryStatisticsExample$.main(SummaryStatisticsExample.scala:17)18     at SummaryStatisticsExample.main(SummaryStatisticsExample.scala)19     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)20     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)21     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)22     at java.lang.reflect.Method.invoke(Method.java:606)23     at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)24 25 26 Process finished with exit code 1

在第5行位置提示:A master URL must be set in your configuration

解決方案:

Run->Edit Configurations->Configuration介面下,將VM-optionsz設定為“-Dspark.master=local”

A master URL must be set in your configuration問題解決方案

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.