通过定义不同的端口我希望在同一台机器上启动2个主机,但它失败了:
$ $SPARK_HOME/sbin/start-master.sh --port 8001 --webui-port 8011
starting org.apache.spark.deploy.master.Master, logging to /Users/brandl/bin/spark-2.2.0-bin-hadoop2.7/logs/spark-brandl-org.apache.spark.deploy.master.Master-1-scicomp-mac-12.local.out
$ $SPARK_HOME/sbin/start-master.sh --port 8002 --webui-port 8012
org.apache.spark.deploy.master.Master running as process 29436. Stop it first.
为什么这不起作用?我是否需要调整更多设置以允许多个实例?
按照相同的逻辑,我可能想在同一台机器上启动两个工作人员。但即使它们应该连接到不同的主人,这也会失败并出现类似的错误:
$SPARK_HOME/sbin/start-slave.sh --webui-port 8050 spark://foo:7077
starting org.apache.spark.deploy.worker.Worker, logging to /Users/brandl/bin/spark-2.2.0-bin-hadoop2.7/logs/spark-brandl-org.apache.spark.deploy.worker.Worker-1-scicomp-mac-12.local.out
starting org.apache.spark.deploy.worker.Worker, logging to /Users/brandl/bin/spark-2.2.0-bin-hadoop2.7/logs/spark-brandlorg.apache.spark.deploy.worker.Worker-2-scicomp-mac-12.local.out
$SPARK_HOME/sbin/start-slave.sh --webui-port 8051 spark://bar:7077
org.apache.spark.deploy.worker.Worker running as process 29503. Stop it first.
org.apache.spark.deploy.worker.Worker running as process 29526. Stop it first.
如果选中了spark standalone docs,但找不到任何关于我做错的指导。
答案 0 :(得分:1)
由于此处没有答案,我回到了火花源,并搜索了引发错误的code bits。这揭示了通过设置不同的SPARK_IDENT_STRING
多个主人和工人可以在同一台机器上运行
$ $SPARK_HOME/sbin/start-master.sh --port 8001 --webui-port 8011
export SPARK_IDENT_STRING=foo
$ $SPARK_HOME/sbin/start-master.sh --port 8002 --webui-port 8012
默认值为用户名($USER
)