신은섭(Shin Eun Seop)

delete unusing show()

...@@ -37,7 +37,7 @@ public class Aggregation { ...@@ -37,7 +37,7 @@ public class Aggregation {
37 dataset = agg.countClickInTenMinutes(dataset); 37 dataset = agg.countClickInTenMinutes(dataset);
38 38
39 // test 39 // test
40 - dataset.where("ip == '5348' and app == '19'").show(10); 40 +// dataset.where("ip == '5348' and app == '19'").show(10);
41 41
42 // Save to scv 42 // Save to scv
43 Utill.saveCSVDataSet(dataset, result_path); 43 Utill.saveCSVDataSet(dataset, result_path);
......
...@@ -16,8 +16,7 @@ public class Utill { ...@@ -16,8 +16,7 @@ public class Utill {
16 16
17 public static void saveCSVDataSet(Dataset<Row> dataset, String path){ 17 public static void saveCSVDataSet(Dataset<Row> dataset, String path){
18 // Read SCV to DataSet 18 // Read SCV to DataSet
19 - dataset.repartition(1) 19 + dataset.write().format("com.databricks.spark.csv")
20 - .write().format("com.databricks.spark.csv")
21 .option("inferSchema", "true") 20 .option("inferSchema", "true")
22 .option("header", "true") 21 .option("header", "true")
23 .save(path); 22 .save(path);
......