changed logic to split for communities
This commit is contained in:
parent
6410ab71d8
commit
13c66e16be
|
@ -57,13 +57,11 @@ public class CommunitySplit implements Serializable {
|
|||
Dataset<CommunityResult> community_products = result
|
||||
.filter((FilterFunction<CommunityResult>) r -> containsCommunity(r, c));
|
||||
|
||||
|
||||
community_products
|
||||
.write()
|
||||
.option("compression", "gzip")
|
||||
.mode(SaveMode.Overwrite)
|
||||
.json(outputPath + "/" + c);
|
||||
|
||||
community_products
|
||||
.write()
|
||||
.option("compression", "gzip")
|
||||
.mode(SaveMode.Overwrite)
|
||||
.json(outputPath + "/" + c);
|
||||
|
||||
}
|
||||
|
||||
|
@ -72,9 +70,9 @@ public class CommunitySplit implements Serializable {
|
|||
return r
|
||||
.getContext()
|
||||
.stream()
|
||||
.map(con -> con.getCode())
|
||||
.collect(Collectors.toList())
|
||||
.contains(c);
|
||||
.map(con -> con.getCode())
|
||||
.collect(Collectors.toList())
|
||||
.contains(c);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue