diff --git a/spark/core/src/main/java/zingg/spark/core/context/ZinggSparkContext.java b/spark/core/src/main/java/zingg/spark/core/context/ZinggSparkContext.java index c9fcaac34..8d9987426 100644 --- a/spark/core/src/main/java/zingg/spark/core/context/ZinggSparkContext.java +++ b/spark/core/src/main/java/zingg/spark/core/context/ZinggSparkContext.java @@ -34,10 +34,8 @@ public class ZinggSparkContext extends Context, 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) { @@ -55,7 +53,6 @@ public void init(SparkSession session) LOG.debug("Context " + ctx.toString()); //initHashFns(); ctx.setCheckpointDir("/tmp/checkpoint"); - setUtils(); } } catch(Throwable e) { @@ -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 {