Your hostname, xxx resolves to a loopback address: 127.0.1.1; using x.x.x.x instead(on interface xx)

弹出的警告是这样的:
20/04/22 14:47:32 WARN util.Utils: Your hostname, zh123-PC resolves to a loopback address: 127.0.1.1; using 192.168.0.103 instead (on interface enp3s0f1)
20/04/22 14:47:32 WARN util.Utils: Set SPARK_LOCAL_IP if you need to bind to another address

This is a WRAN prompt. Although it does not affect the operation of the program, it is not perfect after all. The
solution has been given in the prompt; it
means that you set the spark local ip in the Spark configuration file. If it is not set, it will be in by default Obtain the ip address in the network card, and then this address is inconsistent with the address of the master configured in the configuration file, so a prompt pops up

  • You only need to enter $SPARK_HOME/conf/
  • Then modify the configuration file spark-env.sh (ie the environment configuration file) and add the following information
# 这个localhost即绑定的spark本地地址,只需要和 SPARK_MASTER_IP 所配置的地址一致即可消除警告
SPARK_LOCAL_IP=localhost

Guess you like

Origin blog.csdn.net/qq_42359956/article/details/105682739