-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-21498][Examples] quick start -> one py demo have some bug in code #18722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
a928de1
d7b6cb8
77142b5
e0fe00f
3a94272
a31cbd8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -389,7 +389,7 @@ As an example, we'll create a simple Spark application, `SimpleApp.py`: | |
| from pyspark.sql import SparkSession | ||
|
|
||
| logFile = "YOUR_SPARK_HOME/README.md" # Should be some file on your system | ||
| spark = SparkSession.builder().appName(appName).master(master).getOrCreate() | ||
| spark = SparkSession.builder.appName("SimpleApp").getOrCreate() | ||
| logData = spark.read.text(logFile).cache() | ||
|
|
||
| numAs = logData.filter(logData.value.contains('a')).count() | ||
|
|
@@ -421,16 +421,15 @@ $ YOUR_SPARK_HOME/bin/spark-submit \ | |
| Lines with a: 46, Lines with b: 23 | ||
| {% endhighlight %} | ||
|
|
||
| If you have PySpark pip installed into your enviroment (e.g. `pip instal pyspark` you can run your application with the regular Python interpeter or use the provided spark-submit as you prefer. | ||
| If you have PySpark pip installed into your enviroment (e.g., `pip install pyspark` you can run your application with the regular Python Interpreter or use the provided 'spark-submit' as you prefer. | ||
|
|
||
| {% highlight bash %} | ||
| # Use spark-submit to run your application | ||
| # Use the Python Interpreter to run your application | ||
|
||
| $ python SimpleApp.py | ||
| ... | ||
| Lines with a: 46, Lines with b: 23 | ||
| {% endhighlight %} | ||
|
|
||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's revert removing a newline here. Sounds unrelated.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so many new lines , i did again |
||
| </div> | ||
| </div> | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(e.g., `pip install pyspark`->(e.g., `pip install pyspark`)