forked from D-Net/dnet-hadoop
refactoring
This commit is contained in:
parent
e5463fea01
commit
08f8dd9454
|
@ -57,16 +57,12 @@ public class CommunitySplit implements Serializable {
|
|||
Dataset<CommunityResult> community_products = result
|
||||
.filter((FilterFunction<CommunityResult>) r -> containsCommunity(r, c));
|
||||
|
||||
// try {
|
||||
// community_products.first();
|
||||
community_products
|
||||
.write()
|
||||
.option("compression", "gzip")
|
||||
.mode(SaveMode.Overwrite)
|
||||
.json(outputPath + "/" + c);
|
||||
// } catch (Exception e) {
|
||||
//
|
||||
// }
|
||||
|
||||
community_products
|
||||
.write()
|
||||
.option("compression", "gzip")
|
||||
.mode(SaveMode.Overwrite)
|
||||
.json(outputPath + "/" + c);
|
||||
|
||||
}
|
||||
|
||||
|
@ -75,11 +71,9 @@ public class CommunitySplit implements Serializable {
|
|||
return r
|
||||
.getContext()
|
||||
.stream()
|
||||
.map(con -> con.getCode())
|
||||
.collect(Collectors.toList()).contains(c);
|
||||
// .filter(con -> con.getCode().equals(c))
|
||||
// .collect(Collectors.toList())
|
||||
// .size() > 0;
|
||||
.map(con -> con.getCode())
|
||||
.collect(Collectors.toList())
|
||||
.contains(c);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue