Skip to content

Commit bc19a77

Browse files
author
James Lee
committed
filter out header line in SameHostsSolution
1 parent 0df5885 commit bc19a77

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/sparkTutorial/rdd/nasaApacheWebLogs/SameHostsSolution.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ public static void main(String[] args) throws Exception {
2121

2222
JavaRDD<String> intersection = julyFirstHosts.intersection(augustFirstHosts);
2323

24-
intersection.saveAsTextFile("out/nasa_logs_same_hosts.csv");
24+
JavaRDD<String> cleanedHostIntersection = intersection.filter(host -> !host.equals("host"));
25+
26+
cleanedHostIntersection.saveAsTextFile("out/nasa_logs_same_hosts.csv");
2527
}
2628
}

0 commit comments

Comments
 (0)