Students in your tutorial may encounter this. The following code cell generates an error without updating /etc/hosts
sc = SparkContext('local[4]')
The error is as following:
Py4JJavaError: An error occurred while calling None.org.apache.spark.api.java.JavaSparkContext.
: java.net.BindException: Can't assign requested address: Service 'sparkDriver' failed after 16 retries!
Adding the following to the end of /etc/hosts enabled me to run the cell successfully:
Where <hostname> is the output from calling hostname from the shell.