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

config spark-shell to use local ip as driver host #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

clakech
Copy link

@clakech clakech commented Aug 6, 2015

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

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} \
Copy link
Author

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.

Copy link
Owner

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

Copy link
Author

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
@epahomov
Copy link
Owner

epahomov commented Aug 6, 2015

So your changes makes it all work without removing alias?

@clakech
Copy link
Author

clakech commented Aug 6, 2015

Yes, it seems like this solve the problem.

I you can test this on your side to validate that would be cool ;)

@clakech
Copy link
Author

clakech commented Aug 6, 2015

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 ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants