forked from D-Net/dnet-hadoop
moved check from join to method
This commit is contained in:
parent
f5d785e096
commit
e563e65335
|
@ -119,8 +119,7 @@ public class SparkRemoveBlacklistedRelationJob {
|
||||||
.and(
|
.and(
|
||||||
inputRelation
|
inputRelation
|
||||||
.col("target")
|
.col("target")
|
||||||
.equalTo(dedupBL.col("target"))
|
.equalTo(dedupBL.col("target")))),
|
||||||
.and(inputRelation.col("relclass").equalTo(dedupBL.col("relclass"))))),
|
|
||||||
"left_outer");
|
"left_outer");
|
||||||
|
|
||||||
log.info("numberOfRelationAfterJoin: {}", tmp.count());
|
log.info("numberOfRelationAfterJoin: {}", tmp.count());
|
||||||
|
@ -151,7 +150,8 @@ public class SparkRemoveBlacklistedRelationJob {
|
||||||
private static boolean areEquals(Relation ir, Relation bl) {
|
private static boolean areEquals(Relation ir, Relation bl) {
|
||||||
return ir.getRelClass().equals(bl.getRelClass()) &&
|
return ir.getRelClass().equals(bl.getRelClass()) &&
|
||||||
ir.getRelType().equals(bl.getRelType()) &&
|
ir.getRelType().equals(bl.getRelType()) &&
|
||||||
ir.getSubRelType().equals(bl.getSubRelType());
|
ir.getSubRelType().equals(bl.getSubRelType()) &&
|
||||||
|
ir.getRelClass().equals(bl.getRelClass());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static org.apache.spark.sql.Dataset<Relation> readRelations(
|
public static org.apache.spark.sql.Dataset<Relation> readRelations(
|
||||||
|
|
Loading…
Reference in New Issue