Skip to content

Commit

Permalink
adding spark job example
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhanush123 committed Mar 30, 2020
1 parent beec15e commit a49dd0c
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 35 deletions.
6 changes: 0 additions & 6 deletions .dockerignore

This file was deleted.

28 changes: 0 additions & 28 deletions Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ verify_ssl = true
[packages]

[requires]
python_version = "3.8"
python_version = "3.7"
Binary file removed mnist_model.joblib
Binary file not shown.
Binary file removed mnist_model.pkl
Binary file not shown.
7 changes: 7 additions & 0 deletions testspark.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import pyspark

sc = pyspark.SparkContext()
rdd = sc.parallelize(['Hello,', 'world!', 'dog', 'elephant', 'panther'])
res = rdd.collect()
print("res", res)
rdd.coalesce(1).saveAsTextFile(SPARK_BUCKET_OUTPUT_PATH)

0 comments on commit a49dd0c

Please sign in to comment.