I am trying to figure out how to develop apache-spark program in PyCharm. I have followed article in this link. I define SPARK_HOME and add pyspark to Python path well. There is no error in importing pyspark modules and autocomplete works fine.
However I get an error on defining SparkContext when I run the program in PyCharm.
Error: Must specify a primary resource (JAR or Python or R file)
Run with --help for usage help or --verbose for debug output
...
...
Exception: Java gateway process exited before sending the driver its port number
I managed to run the program on terminal with submit-spark. Do I need to change the configuration on PyCharm or Is there anyway to run submit-spark instead of python in PyCharm?