Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-18171][MESOS] Show correct framework address in mesos master web ui when the advertised address is used #15684

Conversation

lins05
Copy link
Contributor

@lins05 lins05 commented Oct 30, 2016

What changes were proposed in this pull request?

In SPARK-4563 we added the support for the driver to advertise a different hostname/ip (spark.driver.host to the executors other than the hostname/ip the driver actually binds to (spark.driver.bindAddress). But in the mesos webui's frameworks page, it still shows the driver's binds hostname/ip (though the web ui link is correct). We should fix it to make them consistent.

Before:

mesos-spark

After:

mesos-spark2

This PR doesn't affect the behavior on the spark side, only makes the display on the mesos master side more consistent.

How was this patch tested?

Manual test.

  • Build the package and build a docker image (spark:2.1-test)
./dev/make-distribution.sh -Phadoop-2.6 -Phive -Phive-thriftserver -Pyarn -Pmesos
  • Then run the spark driver inside a docker container.
docker run --rm -it \
  --name=spark \
  -p 30000-30010:30000-30010 \
  -e LIBPROCESS_ADVERTISE_IP=172.17.42.1 \
  -e LIBPROCESS_PORT=30000 \
  -e MESOS_NATIVE_LIBRARY=/usr/local/lib/libmesos-1.0.0.so \
  -e MESOS_NATIVE_JAVA_LIBRARY=/usr/local/lib/libmesos-1.0.0.so \
  -e SPARK_HOME=/opt/dist \
  spark:2.1-test
  • Inside the container, launch the spark driver, making use of the advertised address:
/opt/dist/bin/spark-shell \
  --master mesos://zk://172.17.42.1:2181/mesos \
  --conf spark.driver.host=172.17.42.1 \
  --conf spark.driver.bindAddress=172.17.0.1 \
  --conf spark.driver.port=30001 \
  --conf spark.driver.blockManager.port=30002 \
  --conf spark.ui.port=30003 \
  --conf spark.mesos.coarse=true \
  --conf spark.cores.max=2 \
  --conf spark.executor.cores=1 \
  --conf spark.executor.memory=1g \
  --conf spark.mesos.executor.docker.image=spark:2.1-test
  • Run several spark jobs to ensure everything is running fine.
val rdd = sc.textFile("file:///opt/dist/README.md")
rdd.cache().count

@SparkQA
Copy link

SparkQA commented Oct 30, 2016

Test build #67778 has finished for PR 15684 at commit 19a4261.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@lins05
Copy link
Contributor Author

lins05 commented Oct 30, 2016

/cc @zsxwing who worked on SPARK-4563 and @mgummelt .

@lins05
Copy link
Contributor Author

lins05 commented Nov 7, 2016

@zsxwing @mgummelt could you help review this PR?

@tnachen
Copy link
Contributor

tnachen commented Dec 6, 2016

LGTM, @srowen can you help on this?

@srowen
Copy link
Member

srowen commented Dec 6, 2016

Merged to master

@asfgit asfgit closed this in a8ced76 Dec 6, 2016
@lins05 lins05 deleted the spark-18171-show-correct-host-name-in-mesos-master-web-ui branch December 7, 2016 02:06
robert3005 pushed a commit to palantir/spark that referenced this pull request Dec 15, 2016
…eb ui when the advertised address is used

## What changes were proposed in this pull request?

In [SPARK-4563](https://issues.apache.org/jira/browse/SPARK-4563) we added the support for the driver to advertise a different hostname/ip (`spark.driver.host` to the executors other than the hostname/ip the driver actually binds to (`spark.driver.bindAddress`). But in the mesos webui's frameworks page, it still shows the driver's binds hostname/ip (though the web ui link is correct). We should fix it to make them consistent.

Before:

![mesos-spark](https://cloud.githubusercontent.com/assets/717363/19835148/4dffc6d4-9eb8-11e6-8999-f80f10e4c3f7.png)

After:

![mesos-spark2](https://cloud.githubusercontent.com/assets/717363/19835149/54596ae4-9eb8-11e6-896c-230426acd1a1.png)

This PR doesn't affect the behavior on the spark side, only makes the display on the mesos master side more consistent.
## How was this patch tested?

Manual test.
- Build the package and build a docker image (spark:2.1-test)

``` sh
./dev/make-distribution.sh -Phadoop-2.6 -Phive -Phive-thriftserver -Pyarn -Pmesos
```
-  Then run the spark driver inside a docker container.

``` sh
docker run --rm -it \
  --name=spark \
  -p 30000-30010:30000-30010 \
  -e LIBPROCESS_ADVERTISE_IP=172.17.42.1 \
  -e LIBPROCESS_PORT=30000 \
  -e MESOS_NATIVE_LIBRARY=/usr/local/lib/libmesos-1.0.0.so \
  -e MESOS_NATIVE_JAVA_LIBRARY=/usr/local/lib/libmesos-1.0.0.so \
  -e SPARK_HOME=/opt/dist \
  spark:2.1-test
```
- Inside the container, launch the spark driver, making use of the advertised address:

``` sh
/opt/dist/bin/spark-shell \
  --master mesos://zk://172.17.42.1:2181/mesos \
  --conf spark.driver.host=172.17.42.1 \
  --conf spark.driver.bindAddress=172.17.0.1 \
  --conf spark.driver.port=30001 \
  --conf spark.driver.blockManager.port=30002 \
  --conf spark.ui.port=30003 \
  --conf spark.mesos.coarse=true \
  --conf spark.cores.max=2 \
  --conf spark.executor.cores=1 \
  --conf spark.executor.memory=1g \
  --conf spark.mesos.executor.docker.image=spark:2.1-test
```
- Run several spark jobs to ensure everything is running fine.

``` scala
val rdd = sc.textFile("file:///opt/dist/README.md")
rdd.cache().count
```

Author: Shuai Lin <linshuai2012@gmail.com>

Closes apache#15684 from lins05/spark-18171-show-correct-host-name-in-mesos-master-web-ui.
uzadude pushed a commit to uzadude/spark that referenced this pull request Jan 27, 2017
…eb ui when the advertised address is used

## What changes were proposed in this pull request?

In [SPARK-4563](https://issues.apache.org/jira/browse/SPARK-4563) we added the support for the driver to advertise a different hostname/ip (`spark.driver.host` to the executors other than the hostname/ip the driver actually binds to (`spark.driver.bindAddress`). But in the mesos webui's frameworks page, it still shows the driver's binds hostname/ip (though the web ui link is correct). We should fix it to make them consistent.

Before:

![mesos-spark](https://cloud.githubusercontent.com/assets/717363/19835148/4dffc6d4-9eb8-11e6-8999-f80f10e4c3f7.png)

After:

![mesos-spark2](https://cloud.githubusercontent.com/assets/717363/19835149/54596ae4-9eb8-11e6-896c-230426acd1a1.png)

This PR doesn't affect the behavior on the spark side, only makes the display on the mesos master side more consistent.
## How was this patch tested?

Manual test.
- Build the package and build a docker image (spark:2.1-test)

``` sh
./dev/make-distribution.sh -Phadoop-2.6 -Phive -Phive-thriftserver -Pyarn -Pmesos
```
-  Then run the spark driver inside a docker container.

``` sh
docker run --rm -it \
  --name=spark \
  -p 30000-30010:30000-30010 \
  -e LIBPROCESS_ADVERTISE_IP=172.17.42.1 \
  -e LIBPROCESS_PORT=30000 \
  -e MESOS_NATIVE_LIBRARY=/usr/local/lib/libmesos-1.0.0.so \
  -e MESOS_NATIVE_JAVA_LIBRARY=/usr/local/lib/libmesos-1.0.0.so \
  -e SPARK_HOME=/opt/dist \
  spark:2.1-test
```
- Inside the container, launch the spark driver, making use of the advertised address:

``` sh
/opt/dist/bin/spark-shell \
  --master mesos://zk://172.17.42.1:2181/mesos \
  --conf spark.driver.host=172.17.42.1 \
  --conf spark.driver.bindAddress=172.17.0.1 \
  --conf spark.driver.port=30001 \
  --conf spark.driver.blockManager.port=30002 \
  --conf spark.ui.port=30003 \
  --conf spark.mesos.coarse=true \
  --conf spark.cores.max=2 \
  --conf spark.executor.cores=1 \
  --conf spark.executor.memory=1g \
  --conf spark.mesos.executor.docker.image=spark:2.1-test
```
- Run several spark jobs to ensure everything is running fine.

``` scala
val rdd = sc.textFile("file:///opt/dist/README.md")
rdd.cache().count
```

Author: Shuai Lin <linshuai2012@gmail.com>

Closes apache#15684 from lins05/spark-18171-show-correct-host-name-in-mesos-master-web-ui.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants