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

Lines changed: 3 additions & 3 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy