-
Notifications
You must be signed in to change notification settings - Fork 77
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
config spark-shell to use local ip as driver host #2
base: master
Are you sure you want to change the base?
Conversation
cd /usr/local/spark | ||
./bin/spark-shell \ | ||
--master spark://${SPARK_MASTER_PORT_7077_TCP_ADDR}:${SPARK_MASTER_ENV_SPARK_MASTER_PORT} \ | ||
-i ${SPARK_LOCAL_IP} \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find any pointer to this option for spark-shell ? Can you help me to understand what does this option is for ?
Same option is used for launching workers using spark-class but I can't find any clue either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's from some instructions on running spark shell I guess. I don't really remember
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find it anywhere :'(
by default shell communicate its internal hostname to worker so when worker try to communicate with shell, since its hostname is internal, the worker cannot resolve the hostname. using shell local ip as driver host solve this problem. see Networking documentation of spark configuration: http://spark.apache.org/docs/latest/configuration.html#networking + fix small typo to rename start-worker to start-worker.sh
So your changes makes it all work without removing alias? |
Yes, it seems like this solve the problem. I you can test this on your side to validate that would be cool ;) |
And I write a tutorial referencing your work here: https://gist.github.com/clakech/4a4568daba1ca108f03c If you want to setup a spark cluster storing data into cassandra using docker, this is my 2 cents ;) |
by default shell communicate its internal hostname to worker
so when worker try to communicate with shell, since its hostname is
internal, the worker cannot resolve the hostname.
using shell local ip as driver host solve this problem.
see Networking documentation of spark configuration:
http://spark.apache.org/docs/latest/configuration.html#networking