Skip to content

Commit bcc5210

Browse files
authored
Update AirportsByCountrySolution.java
1 parent f158696 commit bcc5210

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/sparkTutorial/pairRdd/groupbykey/AirportsByCountrySolution.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ public static void main(String[] args) throws Exception {
2020

2121
JavaRDD<String> lines = sc.textFile("in/airports.text");
2222

23-
JavaPairRDD<String, String> CountryAndAirportNameAndPair =
23+
JavaPairRDD<String, String> countryAndAirportNameAndPair =
2424
lines.mapToPair( airport -> new Tuple2<>(airport.split(Utils.COMMA_DELIMITER)[3],
2525
airport.split(Utils.COMMA_DELIMITER)[1]));
2626

27-
JavaPairRDD<String, Iterable<String>> AirportsByCountry = CountryAndAirportNameAndPair.groupByKey();
27+
JavaPairRDD<String, Iterable<String>> airportsByCountry = countryAndAirportNameAndPair.groupByKey();
2828

29-
for (Map.Entry<String, Iterable<String>> airports : AirportsByCountry.collectAsMap().entrySet()) {
29+
for (Map.Entry<String, Iterable<String>> airports : airportsByCountry.collectAsMap().entrySet()) {
3030
System.out.println(airports.getKey() + " : " + airports.getValue());
3131
}
3232
}

0 commit comments

Comments
 (0)