ssh - 创建spark集群,无需ssh无密码访问

标签 ssh apache-spark

如何设置 Spark 集群而不使用无密码访问设置 ssh,因为 document提到:

If you do not have a password-less setup, you can set the environment variable SPARK_SSH_FOREGROUND and serially provide a password for each worker.

我想知道如何使用 SPARK_SSH_FOREGROUND 变量??

最佳答案

环境变量SPARK_SSH_FOREGROUND可以设置为yesy之类的东西,以在前台执行ssh

正如您在源代码中看到的:

https://github.com/apache/spark/pull/2444/commits/1bba8a959ea9ecf21eb0783d3ce302065bf1a154

if [ "${SPARK_SSH_FOREGROUND}" = "y" ] || [ "${SPARK_SSH_FOREGROUND}" = "yes" ]; then
ssh $SPARK_SSH_OPTS "$slave" $"${@// /\\ }" \

关于ssh - 创建spark集群,无需ssh无密码访问,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37246119/

相关文章:

git - 即使使用 key 验证进行设置,Git仍需要密码

node.js - 错误: Incompatible SOCKS protocol version: 71

java - 在使用 kafka 和 Spark Streaming 创建直接流之前获取主题的分区数量?

apache-spark - Spark 提交: --jars does not work

apache-spark - kafka 流式读取第一批中的所有数据

bash - 使用bash命令从远程服务器读取大文件的前n行

python - 使用 paramiko python ssh 库通过 xterm run 远程执行程序

linux - expect Interact 一遍又一遍地读取匹配的行而不继续前进

apache-spark - 如果 Spark 中每个组满足特定条件,则向列添加值

scala - NoClassDefFoundError:SparkSession-即使构建正常