Skip to content

Commit

Permalink
updated init
Browse files Browse the repository at this point in the history
  • Loading branch information
sonalgoyal committed Oct 10, 2024
1 parent 435f32b commit 983f4d9
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ public class ZinggSparkContext extends Context<SparkSession, Dataset<Row>, Row,C
protected JavaSparkContext ctx;
public static final Log LOG = LogFactory.getLog(ZinggSparkContext.class);



@Override
public void init(SparkSession session)

public void initSessionAndContext(SparkSession session)
throws ZinggClientException {
try{
// if (session==null) {
Expand All @@ -55,7 +53,6 @@ public void init(SparkSession session)
LOG.debug("Context " + ctx.toString());
//initHashFns();
ctx.setCheckpointDir("/tmp/checkpoint");
setUtils();
}
}
catch(Throwable e) {
Expand All @@ -64,6 +61,13 @@ public void init(SparkSession session)
}
}

@Override
public void init(SparkSession session)
throws ZinggClientException {
initSessionAndContext(session);
setUtils();
}

@Override
public void cleanup() {
try {
Expand Down

0 comments on commit 983f4d9

Please sign in to comment.