From a5ea6d8f048183758ca487eaf8e642d5b529227c Mon Sep 17 00:00:00 2001 From: Vikas Gupta Date: Mon, 7 Aug 2023 18:20:53 +0530 Subject: [PATCH] refactoring --- .../main/java/zingg/common/core/executor/Matcher.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/common/core/src/main/java/zingg/common/core/executor/Matcher.java b/common/core/src/main/java/zingg/common/core/executor/Matcher.java index 6b0ece592..2aae7fea2 100644 --- a/common/core/src/main/java/zingg/common/core/executor/Matcher.java +++ b/common/core/src/main/java/zingg/common/core/executor/Matcher.java @@ -262,8 +262,7 @@ public void writeOutput( ZFrame blocked, ZFrame dupesActual) th if (LOG.isDebugEnabled()) { score.show(); } - ZFramegraphWithScores = getDSUtil().joinZColFirst( - score, graph, ColName.ID_COL, false).cache(); + ZFrame graphWithScores = getGraphWithScores(graph, score); //graphWithScores.toJavaRDD().saveAsTextFile("/tmp/zgraphWScores"); graphWithScores = graphWithScores.drop(ColName.HASH_COL); graphWithScores = graphWithScores.drop(ColName.COL_PREFIX + ColName.ID_COL); @@ -287,6 +286,12 @@ public void writeOutput( ZFrame blocked, ZFrame dupesActual) th } + protected ZFrame getGraphWithScores(ZFrame graph, ZFrame score) { + ZFramegraphWithScores = getDSUtil().joinZColFirst( + score, graph, ColName.ID_COL, false).cache(); + return graphWithScores; + } + protected ZFramegetMinMaxScores(ZFramedupes, ZFramegraph) throws Exception { if (LOG.isDebugEnabled()) dupes.show(500);