forked from D-Net/dnet-hadoop
changed logic to split for communities
This commit is contained in:
parent
6410ab71d8
commit
13c66e16be
|
@ -57,14 +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));
|
||||||
|
|
||||||
|
|
||||||
community_products
|
community_products
|
||||||
.write()
|
.write()
|
||||||
.option("compression", "gzip")
|
.option("compression", "gzip")
|
||||||
.mode(SaveMode.Overwrite)
|
.mode(SaveMode.Overwrite)
|
||||||
.json(outputPath + "/" + c);
|
.json(outputPath + "/" + c);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean containsCommunity(CommunityResult r, String c) {
|
private static boolean containsCommunity(CommunityResult r, String c) {
|
||||||
|
|
Loading…
Reference in New Issue