Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2808#discussion_r18999281
  
    --- Diff: docs/streaming-programming-guide.md ---
    @@ -213,6 +213,67 @@ The complete code can be found in the Spark Streaming 
example
     <br>
     
     </div>
    +<div data-lang="python"  markdown="1" >
    +First, we import StreamingContext, which is the main entry point for all 
streaming functionality. We create a local StreamingContext with two execution 
threads, and batch interval of 1 second.
    +
    +{% highlight python %}
    +from pyspark import SparkContext
    +from pyspark.streaming import StreamingContext
    +
    +# Create a local StreamingContext with two working thread and batch 
interval of 1 second
    +sc = SparkContext("local[2]", "NetworkWordCount")
    +ssc = new StreamingContext(sc, 1)
    --- End diff --
    
    We don't need the `new` in Python.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to