首先是需要将hadoop的配置文件core-site,xml和hdfs-site.xml 拷贝到Spark conf目录下
然后启动提交即可
spark-submit / --master spark://hadoop-namenode-01:7077,hadoop-namenode-02:7077 / --class org.apache.spark.examples.SparkPi / --deploy-mode cluster / --executor-memory 4G / --total-executor-cores 10 / hdfs://bi/spark-examples-1.6.0-hadoop2.6.4.jar / 100
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/9049.html