Skip to content

Commit

Permalink
correct errors in Spark
Browse files Browse the repository at this point in the history
  • Loading branch information
iblanque committed Jul 28, 2017
1 parent 634e155 commit f85cafe
Show file tree
Hide file tree
Showing 15 changed files with 76 additions and 93 deletions.
157 changes: 70 additions & 87 deletions Spark/derby.log

Large diffs are not rendered by default.

Binary file modified Spark/metastore_db/db.lck
Binary file not shown.
Binary file modified Spark/metastore_db/log/log.ctrl
Binary file not shown.
Binary file modified Spark/metastore_db/log/log1.dat
Binary file not shown.
Binary file modified Spark/metastore_db/log/logmirror.ctrl
Binary file not shown.
Binary file modified Spark/metastore_db/seg0/c180.dat
Binary file not shown.
Binary file modified Spark/metastore_db/seg0/c191.dat
Binary file not shown.
Binary file modified Spark/metastore_db/seg0/c1a1.dat
Binary file not shown.
Binary file modified Spark/metastore_db/seg0/c1b1.dat
Binary file not shown.
Binary file modified Spark/metastore_db/seg0/c230.dat
Binary file not shown.
Binary file modified Spark/metastore_db/seg0/c241.dat
Binary file not shown.
2 changes: 1 addition & 1 deletion Spark/wc_spark.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from pyspark import SparkConf, SparkContext
import sys

conf = SparkConf().setMaster("local").setAppName("My App")
conf = SparkConf().setAppName("My App")
sc = SparkContext(conf = conf)

if len(sys.argv)<2 :
Expand Down
Binary file modified WordCount/WordCount.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions spark_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ source vars.sh

echo "##### Compute an approximation of Pi in python"
cd Spark
spark-submit --executor-memory 256M --num-executors 1 --master mesos://$MESOSCLUSTER:$MESOSPORT spark-pi.py
spark-submit --executor-memory 512M --total-executor-cores 2 --master mesos://$MESOSCLUSTER:$MESOSPORT spark-pi.py

echo "############ Spark job via spark-submit, with interaction with HDFS"
echo "##### Compute wordcount with Spark"
hdfs dfs -copyFromLocal palabras.txt $HDFSHOMEDIR/WordCount
spark-submit --executor-memory 256M --num-executors 1 --master mesos://$MESOSCLUSTER:$MESOSPORT wc_spark.py hdfs://$HDFSINTERNAL:$HDFSPORT$HDFSHOMEDIR/WordCount/palabras.txt
spark-submit --executor-memory 512M --total-executor-cores 4 --master mesos://$MESOSCLUSTER:$MESOSPORT wc_spark.py hdfs://$HDFSINTERNAL:$HDFSPORT$HDFSHOMEDIR/WordCount/palabras.txt

sleep $PAUSETIME


echo "############ Spark execution via spark-shell, without interaction with HDFS"
echo "##### Compute an approximation of Pi in python"

spark-shell --executor-memory=256M --master mesos://$MESOSCLUSTER:$MESOSPORT <spark_pi.scala
spark-shell --executor-memory=512M --master mesos://$MESOSCLUSTER:$MESOSPORT <spark_pi.scala
cd ..

4 changes: 2 additions & 2 deletions vars.sh → vars_template.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MESOSCLUSTER=158.42.104.238
HDFSINTERNAL=10.0.0.22
MESOSCLUSTER=
HDFSINTERNAL=
HDFSPORT=9000
MESOSPORT=5050
CHRONOSPORT=4400
Expand Down

0 comments on commit f85cafe

Please sign in to comment.