Skip to content

Commit

Permalink
added self-contained word count in PySpark
Browse files Browse the repository at this point in the history
  • Loading branch information
pyspark-in-action committed Jan 29, 2018
1 parent d413439 commit 9df039f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tutorial/wordcount/run_word_count.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# define Spark's installed directory
export SPARK_HOME="/Users/mparsian/spark-2.2.1"
#
# define your input path
#INPUT_PATH="$SPARK_HOME/licenses/LICENSE-heapq.txt"
#
# define your PySpark program
PROG="/Users/mparsian/zmp/pyspark_book_project/programs/word_count.py"
#
# submit your spark application
$SPARK_HOME/bin/spark-submit $PROG
11 changes: 11 additions & 0 deletions tutorial/wordcount/run_word_count_ver2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# define Spark's installed directory
export SPARK_HOME="/Users/mparsian/spark-2.2.1"
#
# define your input path
INPUT_PATH="file:///Users/mparsian/spark-2.2.1/zbin/sample.txt"
#
# define your PySpark program
PROG="/Users/mparsian/zmp/github/pyspark-tutorial/tutorial/wordcount/word_count_ver2.py"
#
# submit your spark application
$SPARK_HOME/bin/spark-submit $PROG $INPUT_PATH

0 comments on commit 9df039f

Please sign in to comment.