WIP: dump of the OpenAIRE graph - Changes #103

Closed
miriam.baglioni wants to merge 77 commits from miriam.baglioni/dnet-hadoop:dump into master
1 changed files with 9 additions and 15 deletions
Showing only changes of commit 08f8dd9454 - Show all commits

View File

@ -57,16 +57,12 @@ public class CommunitySplit implements Serializable {
Dataset<CommunityResult> community_products = result Dataset<CommunityResult> community_products = result
.filter((FilterFunction<CommunityResult>) r -> containsCommunity(r, c)); .filter((FilterFunction<CommunityResult>) r -> containsCommunity(r, c));
// try {
// community_products.first(); community_products
community_products .write()
.write() .option("compression", "gzip")
.option("compression", "gzip") .mode(SaveMode.Overwrite)
.mode(SaveMode.Overwrite) .json(outputPath + "/" + c);
.json(outputPath + "/" + c);
// } catch (Exception e) {
//
// }
} }
@ -75,11 +71,9 @@ public class CommunitySplit implements Serializable {
return r return r
.getContext() .getContext()
.stream() .stream()
.map(con -> con.getCode()) .map(con -> con.getCode())
.collect(Collectors.toList()).contains(c); .collect(Collectors.toList())
// .filter(con -> con.getCode().equals(c)) .contains(c);
// .collect(Collectors.toList())
// .size() > 0;
} }
return false; return false;
} }