O'Reilly logo
  • Paul Hinton thinks this is interesting:

sc = SparkContext( appName = "Agile Data Science: PySpark Streaming 'Hello, World!'", conf=conf )


Cover of Agile Data Science 2.0


The pyspark command instantiates a SparkContext by default with the name "sc", and instantiating a new one as shown here results in an error message. To get this code to work properly, you will need to first call the stop() methiod on the existing SparkContext like so.


This has been corrected the code in the GitHub repository.