Skip to content

Commit

Permalink
Merge pull request #633 from zinggAI/utilMethods
Browse files Browse the repository at this point in the history
refactoring
  • Loading branch information
sonalgoyal authored Aug 9, 2023
2 parents b0f937b + a5ea6d8 commit 7223732
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,7 @@ public void writeOutput( ZFrame<D,R,C> blocked, ZFrame<D,R,C> dupesActual) th
if (LOG.isDebugEnabled()) {
score.show();
}
ZFrame<D,R,C>graphWithScores = getDSUtil().joinZColFirst(
score, graph, ColName.ID_COL, false).cache();
ZFrame<D, R, C> graphWithScores = getGraphWithScores(graph, score);
//graphWithScores.toJavaRDD().saveAsTextFile("/tmp/zgraphWScores");
graphWithScores = graphWithScores.drop(ColName.HASH_COL);
graphWithScores = graphWithScores.drop(ColName.COL_PREFIX + ColName.ID_COL);
Expand All @@ -287,6 +286,12 @@ public void writeOutput( ZFrame<D,R,C> blocked, ZFrame<D,R,C> dupesActual) th

}

protected ZFrame<D, R, C> getGraphWithScores(ZFrame<D, R, C> graph, ZFrame<D, R, C> score) {
ZFrame<D,R,C>graphWithScores = getDSUtil().joinZColFirst(
score, graph, ColName.ID_COL, false).cache();
return graphWithScores;
}

protected ZFrame<D,R,C>getMinMaxScores(ZFrame<D,R,C>dupes, ZFrame<D,R,C>graph) throws Exception {
if (LOG.isDebugEnabled()) dupes.show(500);

Expand Down

0 comments on commit 7223732

Please sign in to comment.