Fix makefile, fix zip

This commit is contained in:
Max O'Cull 2019-04-20 21:49:39 -04:00
parent 0764e20842
commit fcf3ec326e
2 changed files with 13 additions and 8 deletions

View File

@ -1,18 +1,23 @@
.PHONY=clean build submit
all: package submit
all: build
clean:
mvn clean
build:
mvn clean package
package:
mvn package
submit:
q1:
spark-submit --class cs448.App target/p4-1.0-SNAPSHOT.jar -i "/user/mocull/input" -o "/user/mocull/output" -q 1,12,3 -test
q2:
spark-submit --class cs448.App target/p4-1.0-SNAPSHOT.jar -i "/user/mocull/input" -o "/user/mocull/output" -q 2,12,3 -test
q3:
spark-submit --class cs448.App target/p4-1.0-SNAPSHOT.jar -i "/user/mocull/input" -o "/user/mocull/output" -q 3,12,3 -test
q4:
spark-submit --class cs448.App target/p4-1.0-SNAPSHOT.jar -i "/user/mocull/input" -o "/user/mocull/output" -q 4,12 -test
test: q1 q2 q3 q4
warmup:
spark-submit --class cs448.App target/p4-1.0-SNAPSHOT.jar -i "/user/mocull/input" -warmup

View File

@ -93,7 +93,7 @@ public class Project4 {
ratingDF.createOrReplaceTempView("Rating");
// Compute the result.
Dataset<Row> resultDF = spark.sql("SELECT DISTINCT u.zip-code FROM User u WHERE u.occupation = " +
Dataset<Row> resultDF = spark.sql("SELECT DISTINCT u.zipcode FROM User u WHERE u.occupation = " +
conf.q2Occupation1 + " OR u.occupation = " +
conf.q2Occupation2);
resultDF.show();