WIP: dump of the OpenAIRE graph - Changes #103
|
@ -57,16 +57,16 @@ 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 {
|
// try {
|
||||||
community_products.first();
|
// 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) {
|
// } catch (Exception e) {
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,9 +75,11 @@ public class CommunitySplit implements Serializable {
|
||||||
return r
|
return r
|
||||||
.getContext()
|
.getContext()
|
||||||
.stream()
|
.stream()
|
||||||
.filter(con -> con.getCode().equals(c))
|
.map(con -> con.getCode())
|
||||||
.collect(Collectors.toList())
|
.collect(Collectors.toList()).contains(c);
|
||||||
.size() > 0;
|
// .filter(con -> con.getCode().equals(c))
|
||||||
|
// .collect(Collectors.toList())
|
||||||
|
// .size() > 0;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue