How to connect master and slaves in Apache-Spark? (Standalone Mode)

后端 未结 3 632
旧巷少年郎
旧巷少年郎 2021-02-03 12:29

I\'m using Spark Standalone Mode tutorial page to install Spark in Standalone mode.

1- I have started a master by:

./sbin/start-master.sh
相关标签:
3条回答
  • 2021-02-03 13:07

    In my case, using spark 2.4.7 in standalone mode, I've created a passwordless ssh key using ssh-keygen, but still got asked for worker password when starting the cluster.

    What I did was follow the instructions here https://www.cyberciti.biz/faq/how-to-set-up-ssh-keys-on-linux-unix/

    This line solved the problem: ssh-copy-id -i $HOME/.ssh/id_rsa.pub user@server-ip

    0 讨论(0)
  • 2021-02-03 13:10

    You can set export SPARK_LOCAL_IP="You-IP" #to set the IP address Spark binds to on this node in $SPARK_HOME/conf/spark-env.sh

    0 讨论(0)
  • 2021-02-03 13:13

    I usually start from spark-env.sh template. And I set, properties that I need. For simple cluster you need:

    • SPARK_MASTER_IP

    Then, create a file called "slaves" in the same directory as spark-env.sh and slaves ip's (one per line). Assure you reach all slaves through ssh.

    Finally, copy this configuration in every machine of your cluster. Then start the entire cluster executing start-all.sh script and try spark-shell to check your configuration.

    > sbin/start-all.sh
    > bin/spark-shell
    
    0 讨论(0)
提交回复
热议问题