[英]Accessing spark cluster mode in spark submit
I am trying to run my spark scala code using spark submit. 我正在尝试使用spark提交运行我的spark scala代码。 I want to access the spark cluster for this purpose.
为此,我想访问Spark集群。 So, what should I use for the master in the Spark Context?
那么,我应该在Spark上下文中对主服务器使用什么? I have used like this
我已经习惯了
val spark = SparkSession.builder()
.master("spark://prod5:7077")
.appName("MyApp")
.getOrCreate;
But it doesn't seem to work. 但这似乎不起作用。 What should I use as the master for using spark cluster?
我应该使用什么作为使用Spark Cluster的主机?
如果要在IDE中提交作业,只需确保“ prod5”是主服务器,然后尝试将端口默认更改为6066。
从官方文档-
spark-submit --class <main-class> --master <master-url> --deploy-mode <deploy-mode> --conf <key>=<value> ... # other options <application-jar> [application-arguments]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.