Mac spark-shell Error initializing SparkContext

Following steps might help:

  1. Get your hostname by using “hostname” command.

  2. Make an entry in the /etc/hosts file for your hostname if not present as follows:

     127.0.0.1      your_hostname
    

Leave a Comment