[英]Spark Worker - Change web ui host in standalone mode
When I view the master node's web ui, it shows all my current workers attached to the cluster.当我查看主节点的 web ui 时,它显示了我当前连接到集群的所有工作人员。
https://spark.apache.org/docs/3.0.0-preview/web-ui.html https://spark.apache.org/docs/3.0.0-preview/web-ui.html
The issue that I am having though is that the IP address it uses for the worker nodes in the web ui is incorrect.我遇到的问题是它用于 web ui 中的工作节点的 IP 地址不正确。 Is there a way to change the worker's web ui host/ip that is used in the master's web ui?有没有办法更改在master的web ui中使用的worker的web ui主机/ip?
Reading through the documentation, there appears to be "SPARK_WORKER_WEBUI_PORT" which sets the port for the worker but there doesn't seem to be a "SPARK_WORKER_WEBUI_HOST".通读文档,似乎有“SPARK_WORKER_WEBUI_PORT”为工作人员设置端口,但似乎没有“SPARK_WORKER_WEBUI_HOST”。
http://spark.apache.org/docs/latest/spark-standalone.html http://spark.apache.org/docs/latest/spark-standalone.html
To provide more context, I currently have a spark cluster that is deployed in stand alone mode.为了提供更多上下文,我目前有一个以独立模式部署的 spark 集群。 The spark cluster (master and slaves) are all behind a router (NAT). spark集群(主从)都在路由器(NAT)后面。 The workers bind to the master using their internal IP address.工作人员使用其内部 IP 地址绑定到主服务器。 I setup port forwarding to route external traffic to each of the master and slaves.我设置端口转发以将外部流量路由到每个主机和从机。 The issue is that since my workers are binding to the master using their internal IP addresses, that it uses the internal IP address in the master node's web ui.问题是,由于我的工作人员使用其内部 IP 地址绑定到主节点,因此它使用主节点 web ui 中的内部 IP 地址。 This makes the worker node's web ui inaccessible for everyone outside of my NAT.这使得我的 NAT 之外的每个人都无法访问工作节点的 web ui。 If there is a way to specifically set the IP address to use for each of my worker's web ui, then this would resolve this problem.如果有办法专门设置 IP 地址以用于我的每个工人的 web ui,那么这将解决这个问题。 Thanks!谢谢!
After more research, I determined that the environment variable I was looking for was: SPARK_PUBLIC_DNS
经过更多研究,我确定我正在寻找的环境变量是: SPARK_PUBLIC_DNS
http://spark.apache.org/docs/latest/spark-standalone.html http://spark.apache.org/docs/latest/spark-standalone.html
This allowed me to set a different external host name for my workers.这使我可以为我的工作人员设置不同的外部主机名。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.