├── .gitignore
├── CONTRIBUTING.md
├── LICENSE.md
├── README.md
├── insightedge-cli
├── pom.xml
└── src
│ └── main
│ └── java
│ └── org
│ └── insightedge
│ └── cli
│ └── commands
│ ├── I9ECommandFactory.java
│ ├── I9EDemoCommand.java
│ └── I9EMainCommand.java
├── insightedge-core
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ └── org
│ │ │ └── insightedge
│ │ │ ├── internal
│ │ │ └── utils
│ │ │ │ ├── ClassLoaderUtils.java
│ │ │ │ └── SparkSessionUtils.java
│ │ │ └── spark
│ │ │ ├── SparkSessionProvider.java
│ │ │ ├── SparkSessionProviderFactoryBean.java
│ │ │ └── japi
│ │ │ └── JBucketedGridModel.java
│ └── scala
│ │ └── org
│ │ ├── apache
│ │ └── spark
│ │ │ └── sql
│ │ │ └── insightedge
│ │ │ ├── DataFrameImplicits.scala
│ │ │ ├── DataFrameSchema.scala
│ │ │ ├── DefaultSource.scala
│ │ │ ├── GeospatialImplicits.scala
│ │ │ ├── expression
│ │ │ ├── GeoContains.scala
│ │ │ ├── GeoExpression.scala
│ │ │ ├── GeoIntersects.scala
│ │ │ └── GeoWithin.scala
│ │ │ ├── filter
│ │ │ ├── GeoContains.scala
│ │ │ ├── GeoIntersects.scala
│ │ │ └── GeoWithin.scala
│ │ │ ├── relation
│ │ │ ├── InsightEdgeAbstractRelation.scala
│ │ │ ├── InsightEdgeClassRelation.scala
│ │ │ ├── InsightEdgeDocumentRelation.scala
│ │ │ └── SchemaInference.scala
│ │ │ └── udt
│ │ │ ├── CircleUDT.scala
│ │ │ ├── GeoUDTRegistration.scala
│ │ │ ├── GeoUtils.scala
│ │ │ ├── LineStringUDT.scala
│ │ │ ├── PointUDT.scala
│ │ │ ├── PolygonUDT.scala
│ │ │ └── RectangleUDT.scala
│ │ └── insightedge
│ │ ├── scala
│ │ └── annotation.scala
│ │ └── spark
│ │ ├── context
│ │ ├── InsightEdgeConfig.scala
│ │ └── InsightEdgeSparkContext.scala
│ │ ├── impl
│ │ ├── InsightEdgePartition.scala
│ │ ├── InsightEdgeQueryIterator.scala
│ │ └── ProfilingIterator.scala
│ │ ├── implicits.scala
│ │ ├── ml
│ │ └── MLImplicits.scala
│ │ ├── mllib
│ │ ├── MLInstance.scala
│ │ └── MLlibImplicits.scala
│ │ ├── model
│ │ └── BucketedGridModel.scala
│ │ ├── rdd
│ │ ├── InsightEdgeAbstractRDD.scala
│ │ ├── InsightEdgeDocumentRDD.scala
│ │ ├── InsightEdgeRDD.scala
│ │ ├── InsightEdgeRDDFunctions.scala
│ │ └── InsightEdgeSqlRDD.scala
│ │ ├── streaming
│ │ ├── SaveDStreamToGridExtension.scala
│ │ └── StreamingImplicits.scala
│ │ └── utils
│ │ ├── BucketIdSeq.scala
│ │ ├── GridProxyFactory.scala
│ │ ├── GridProxyUtils.scala
│ │ ├── GridTopologyAllocator.scala
│ │ ├── InsightEdgeConstants.scala
│ │ ├── LocalCache.scala
│ │ ├── Logging.scala
│ │ ├── LookupPartitionTask.java
│ │ ├── Profiler.scala
│ │ └── StringCompiler.scala
│ └── test
│ ├── java
│ └── org
│ │ ├── apache
│ │ └── spark
│ │ │ └── sql
│ │ │ └── insightedge
│ │ │ ├── JAddress.java
│ │ │ ├── JPerson.java
│ │ │ └── JSpatialData.java
│ │ └── insightedge
│ │ ├── TestCluster.java
│ │ └── spark
│ │ └── rdd
│ │ ├── JBucketedData.java
│ │ └── JData.java
│ ├── resources
│ ├── cluster-member-config.xml
│ ├── cluster-test-config.xml
│ └── data
│ │ └── sample_libsvm_data.txt
│ └── scala
│ └── org
│ ├── apache
│ └── spark
│ │ └── sql
│ │ └── insightedge
│ │ ├── dataframe
│ │ ├── DataFrameCreateSpec.scala
│ │ ├── DataFrameGetWithStringSpec.scala
│ │ ├── DataFrameNestedQuerySpec.scala
│ │ ├── DataFramePersistSpec.scala
│ │ ├── DataFrameQuerySpec.scala
│ │ ├── DataFrameRelationQuerySpec.scala
│ │ └── DataFrameSpatialSpec.scala
│ │ ├── dataset
│ │ ├── DataSetCreateSpec.scala
│ │ ├── DataSetNestedQuerySpec.scala
│ │ ├── DataSetPersistSpec.scala
│ │ ├── DataSetQuerySpec.scala
│ │ └── DataSetSpatialSpec.scala
│ │ └── model
│ │ ├── Address.scala
│ │ ├── AllClassesSupport.scala
│ │ ├── DummyPerson.scala
│ │ ├── NotGridModel.scala
│ │ ├── Person.scala
│ │ ├── SpatialData.scala
│ │ └── SpatialEmbeddedData.scala
│ └── insightedge
│ └── spark
│ ├── fixture
│ ├── InsightEdge.scala
│ └── InsightEdgeStreaming.scala
│ ├── ml
│ └── InsightEdgeMlSpec.scala
│ ├── mllib
│ └── InsightEdgeMLlibSpec.scala
│ ├── rdd
│ ├── BucketedData.scala
│ ├── BucketedGridString.scala
│ ├── Data.scala
│ ├── GridString.scala
│ ├── InsightEdgeRDDSpec.scala
│ └── InsightEdgeSqlRDDSpec.scala
│ ├── streaming
│ └── InsightEdgeStreamingSpec.scala
│ └── utils
│ ├── GridTopologyAllocatorSpec.scala
│ ├── InsightEdgeUtilsSpec.scala
│ ├── StringCompilerSpec.scala
│ └── Tags.scala
├── insightedge-examples
├── Jenkinsfile
├── LICENSE.md
├── README.md
├── build.sbt
├── doc
│ └── images
│ │ ├── idea-configuration.png
│ │ └── idea-configuration_1.png
├── pom.xml
├── project
│ └── assembly.sbt
├── python
│ └── sf_salaries.py
└── src
│ ├── main
│ └── scala
│ │ └── org
│ │ └── insightedge
│ │ └── examples
│ │ ├── basic
│ │ ├── LoadDataFrame.scala
│ │ ├── LoadDataset.scala
│ │ ├── LoadRdd.scala
│ │ ├── LoadRddWithSql.scala
│ │ ├── PersistDataFrame.scala
│ │ ├── PersistDataset.scala
│ │ ├── Product.scala
│ │ ├── SaveRdd.scala
│ │ ├── SaveRddNewContextInitApi.scala
│ │ └── SaveRddNewSessionInitApi.scala
│ │ ├── geospatial
│ │ ├── GasStation.scala
│ │ ├── LoadDataFrameWithGeospatial.scala
│ │ └── LoadRddWithGeospatial.scala
│ │ ├── mllib
│ │ └── SaveAndLoadMLModel.scala
│ │ ├── offheap
│ │ └── OffHeapPersistence.scala
│ │ └── streaming
│ │ ├── HashTag.scala
│ │ ├── TopTags.scala
│ │ └── TwitterPopularTags.scala
│ └── test
│ └── scala
│ └── org
│ └── insightedge
│ └── examples
│ └── InsightedgeExamplesSpec.scala
├── insightedge-integration-tests
├── jobs
│ ├── pom.xml
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── org
│ │ │ └── insightedge
│ │ │ └── spark
│ │ │ └── jobs
│ │ │ ├── Country.java
│ │ │ └── Person.java
│ │ └── scala
│ │ └── org
│ │ └── insightedge
│ │ └── spark
│ │ └── jobs
│ │ ├── ContinuosLoadRdd.scala
│ │ ├── Data.scala
│ │ ├── LoadDataFrame.scala
│ │ ├── LoadRdd.scala
│ │ ├── Product.scala
│ │ ├── SaveRdd.scala
│ │ └── StreamExample.scala
├── pom.xml
└── tests
│ ├── pom.xml
│ └── src
│ └── test
│ ├── resources
│ ├── docker
│ │ ├── demo-mode
│ │ │ ├── Dockerfile
│ │ │ └── bootstrap.sh
│ │ └── failover
│ │ │ └── Dockerfile
│ └── log4j.properties
│ └── scala
│ └── org
│ └── insightedge
│ └── spark
│ ├── examples
│ └── ExamplesSubmitSpec.scala
│ ├── failover
│ ├── DatagridNodeFailOverLoadRddSpec.scala
│ ├── DatagridNodeFailOverSaveRddSpec.scala
│ ├── MachineFailOverLoadRddSpec.scala
│ ├── MachineFailOverSaveRddSpec.scala
│ └── MachineFailOverStreamingSpec.scala
│ ├── fixture
│ └── InsightedgeDemoModeDocker.scala
│ ├── jobs
│ └── LoadDataFrameSpec.scala
│ ├── utils
│ ├── BuildUtils.scala
│ ├── DockerUtils.scala
│ ├── FsUtils.scala
│ ├── InsightEdgeAdminUtils.scala
│ ├── ProcessUtils.scala
│ ├── RestUtils.scala
│ ├── Tags.scala
│ └── TestUtils.scala
│ └── zeppelin
│ └── ZeppelinNotebooksSpec.scala
├── insightedge-packager
├── pom.xml
├── src
│ └── main
│ │ ├── assembly
│ │ └── tests
│ │ │ └── integration-tests.xml
│ │ ├── resources
│ │ └── insightedge
│ │ │ ├── bin
│ │ │ ├── insightedge-pyspark
│ │ │ ├── insightedge-pyspark.cmd
│ │ │ ├── insightedge-shell
│ │ │ ├── insightedge-shell.cmd
│ │ │ ├── insightedge-submit
│ │ │ ├── insightedge-submit.cmd
│ │ │ ├── shell-init.py
│ │ │ └── shell-init.scala
│ │ │ ├── conf
│ │ │ ├── insightedge-env.cmd
│ │ │ ├── insightedge-env.sh
│ │ │ └── spark_log4j.properties
│ │ │ ├── data
│ │ │ ├── montgomery_schools.json
│ │ │ └── sf_salaries_sample.json
│ │ │ ├── spark
│ │ │ └── conf
│ │ │ │ ├── spark-env.cmd
│ │ │ │ └── spark-env.sh
│ │ │ ├── winutils
│ │ │ └── hadoop-winutils-2.6.0.zip
│ │ │ └── zeppelin
│ │ │ ├── bin
│ │ │ ├── common.cmd
│ │ │ └── interpreter.cmd
│ │ │ ├── conf
│ │ │ ├── zeppelin-env.cmd
│ │ │ ├── zeppelin-env.sh
│ │ │ └── zeppelin-site.xml
│ │ │ ├── interpreter
│ │ │ └── spark
│ │ │ │ └── interpreter-setting.json
│ │ │ └── notebook
│ │ │ ├── INSIGHTEDGE-BASIC
│ │ │ └── note.json
│ │ │ ├── INSIGHTEDGE-GEOSPATIAL
│ │ │ └── note.json
│ │ │ └── INSIGHTEDGE-PYTHON
│ │ │ └── note.json
│ │ └── scala
│ │ └── org
│ │ └── insightedge
│ │ └── spark
│ │ └── packager
│ │ ├── Launcher.scala
│ │ └── Utils.scala
├── updateGitInfo.bat
└── updateGitInfo.sh
├── insightedge-zeppelin
├── pom.xml
└── src
│ └── main
│ └── java
│ └── org
│ └── apache
│ └── zeppelin
│ └── insightedge
│ └── CompilingInterpreter.java
└── pom.xml
/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 |
3 | # Mobile Tools for Java (J2ME)
4 | .mtj.tmp/
5 |
6 | # Package Files #
7 | #*.jar
8 | *.war
9 | *.ear
10 |
11 | # IDE garbage
12 | *.iml
13 | *.ipr
14 | *.iws
15 | *.project
16 | *.classpath
17 |
18 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
19 | hs_err_pid*
20 |
21 | # Ignore idea settings
22 | .idea/
23 | **/.idea/*
24 | **/*/*.iml
25 | **/.idea/*
26 | out/
27 | bin/*
28 |
29 | # eclipse specific git ignore
30 | *.pydevproject
31 | .project
32 | .metadata
33 | bin/**
34 | tmp/**
35 | tmp/**/*
36 | *.tmp
37 | *.bak
38 | *.swp
39 | *~.nib
40 | local.properties
41 | .classpath
42 | .settings/
43 | .loadpath
44 |
45 | # Ignore target directories
46 | target/
47 | **/target/*
48 |
49 | #gigaspaces
50 | gigaspaces/*
51 | transaction.log
52 | */xap/*
53 | =======
54 | ### Scala template
55 | *.class
56 | *.log
57 |
58 | # sbt specific
59 | .cache
60 | .history
61 | .lib/
62 | lib/
63 | dist/*
64 | target/
65 | lib_managed/
66 | src_managed/
67 | project/boot/
68 | project/plugins/project/
69 |
70 | # Scala-IDE specific
71 | .scala_dependencies
72 | .worksheet
73 |
74 |
75 | # Created by .ignore support plugin (hsz.mobi)
76 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to InsightEdge
2 |
3 | ## Issue Reports
4 |
5 | Issues are reported and tracked via JIRA - https://xap-issues.atlassian.net
6 |
7 | ## Pull Requests
8 |
9 | Make sure you submit a [Contributor License Agreement](https://xap.github.io/XAP_CLA.pdf) before you submit your first pull request.
10 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2016, GigaSpaces Technologies, Inc. All Rights Reserved.
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # InsightEdge
2 |
3 | **Documentation:** [User Guide](http://insightedge.io/docs/010/index.html)
4 | **Community:** [Slack Channel](http://insightedge-slack.herokuapp.com/), [StackOverflow tag](http://stackoverflow.com/questions/tagged/insightedge), [Email](mailto:hello@insightedge.io)
5 | **Contributing:** [Contribution Guide](https://github.com/InsightEdge/insightedge/blob/branch-1.0/CONTRIBUTING.md)
6 | **Issue Tracker:** [Jira](https://insightedge.atlassian.net)
7 | **License:** [Apache 2.0](https://github.com/InsightEdge/insightedge/blob/master/LICENSE.md)
8 |
9 |
10 | **InsightEdge** is a Spark distribution on top of in-memory [Data Grid](https://github.com/InsightEdge/insightedge-datagrid). A single platform for analytical and transactional workloads.
11 |
12 | ## Features
13 | * Exposes Data Grid as Spark RDDs
14 | * Saves Spark RDDs to Data Grid
15 | * Full DataFrames and Dataset API support with persistence
16 | * Geospatial API for RDD and DataFrames. Geospatial indexes.
17 | * Transparent integration with SparkContext using Scala implicits
18 | * Data Grid side filtering with ability apply indexes
19 | * Running SQL queries in Spark over Data Grid
20 | * Data locality between Spark and Data Grid nodes
21 | * Storing MLlib models in Data Grid
22 | * Continuously saving Spark Streaming computation to Data Grid
23 | * Off-Heap persistence
24 | * Interactive Web Notebook
25 | * Python support
26 |
27 | ## Building InsightEdge
28 |
29 | InsightEdge is built using [Apache Maven](https://maven.apache.org/).
30 |
31 | First, compile and install InsightEdge Core libraries:
32 |
33 | ```bash
34 | # without unit tests
35 | mvn clean install -DskipTests=true
36 |
37 | # with unit tests
38 | mvn clean install
39 | ```
40 |
41 | To build InsightEdge zip distribution you need the following binary dependencies:
42 |
43 | * [insightedge-datagrid 12.3.0](https://xap.github.io/): download a copy of the XAP 12.x Open Source Edition
44 | * [insightedge-examples](https://github.com/InsightEdge/insightedge-examples): use the same branch as in this repo, find build instructions in repository readme
45 | * [insightedge-zeppelin](https://github.com/InsightEdge/insightedge-zeppelin): use the same branch as in this repo, run `./dev/change_scala_version.sh 2.11`, then build with `mvn clean install -DskipTests -P spark-2.1 -P scala-2.11 -P build-distr -Dspark.version=2.1.1`
46 | * [Apache Spark 2.3.0](http://spark.apache.org/downloads.html): download zip
47 |
48 | Package InsightEdge distribution:
49 |
50 | ```bash
51 | mvn clean package -P package-open -DskipTests=true -Ddist.spark= -Ddist.xap=file:/// -Ddist.zeppelin= -Ddist.examples.target=
52 | ```
53 |
54 | The archive is generated under `insightedge-packager/target/open` directory. The archive content is under `insightedge-packager/target/contents-community`.
55 |
56 | To run integration tests refer to the [wiki page](https://github.com/InsightEdge/insightedge/wiki/Integration-tests)
57 |
58 | ## Quick Start
59 |
60 | Build the project and start InsightEdge demo mode with
61 | ```bash
62 | cd insightedge-packager/target/contents-community
63 | ./bin/insightedge -demo
64 | ```
65 |
66 | It starts Zeppelin at http://127.0.0.1:9090 with InsightEdge tutorial and example notebooks you can play with. The full documentation is available at [website](http://insightedge.io/docs/010/index.html).
67 |
--------------------------------------------------------------------------------
/insightedge-cli/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | insightedge-package
7 | org.gigaspaces.insightedge
8 | 16.4.0-SNAPSHOT
9 | ../pom.xml
10 |
11 | 4.0.0
12 |
13 | insightedge-cli
14 |
15 |
16 | 2.2.1
17 |
18 |
19 |
20 |
21 | org.gigaspaces
22 | xap-cli
23 | ${project.version}
24 |
25 |
26 |
27 |
28 | insightedge-cli
29 |
30 |
31 | maven-compiler-plugin
32 |
33 | 1.8
34 | 1.8
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/insightedge-cli/src/main/java/org/insightedge/cli/commands/I9ECommandFactory.java:
--------------------------------------------------------------------------------
1 | package org.insightedge.cli.commands;
2 |
3 | import com.gigaspaces.start.GsCommandFactory;
4 | import com.gigaspaces.start.JavaCommandBuilder;
5 |
6 | public class I9ECommandFactory extends GsCommandFactory {
7 | public static void main(String[] args) {
8 | execute(args, new I9ECommandFactory());
9 | }
10 |
11 | protected JavaCommandBuilder cli() {
12 | super.cli();
13 | command.mainClass("org.insightedge.cli.commands.I9EMainCommand");
14 | // Class path:
15 | command.classpathFromEnv("INSIGHTEDGE_CLASSPATH");
16 | appendOshiClassPath();
17 |
18 | return command;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/insightedge-cli/src/main/java/org/insightedge/cli/commands/I9EMainCommand.java:
--------------------------------------------------------------------------------
1 | package org.insightedge.cli.commands;
2 |
3 | import org.gigaspaces.cli.CliExecutor;
4 | import org.gigaspaces.cli.CommandsSet;
5 | import org.gigaspaces.cli.commands.*;
6 | import picocli.CommandLine.*;
7 |
8 | @Command(headerHeading = I9EMainCommand.HEADER)
9 | public class I9EMainCommand extends XapMainCommand {
10 | public static final String HEADER =
11 | "@|green _____ _ _ _ ______ _ |@%n"+
12 | "@|green |_ _| (_) | | | | | ____| | | |@%n"+
13 | "@|green | | _ __ ___ _ __ _| |__ | |_| |__ __| | __ _ ___ |@%n"+
14 | "@|green | | | '_ \\/ __| |/ _` | '_ \\| __| __| / _` |/ _` |/ _ \\|@%n"+
15 | "@|green _| |_| | | \\__ \\ | (_| | | | | |_| |___| (_| | (_| | __/|@%n"+
16 | "@|green |_____|_| |_|___/_|\\__, |_| |_|\\__|______\\__,_|\\__, |\\___||@%n"+
17 | "@|green __/ | __/ | |@%n"+
18 | "@|green |___/ |___/ |@%n" +
19 | "%n";
20 |
21 | public static void main(String[] args) {
22 | CliExecutor.execute(new I9EMainCommand(), args);
23 | }
24 |
25 | @Override
26 | public CommandsSet getSubCommands() {
27 | CommandsSet result = new CommandsSet(super.getSubCommands());
28 | result.add(new I9EDemoCommand());
29 | return result;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/insightedge-core/src/main/java/org/insightedge/internal/utils/ClassLoaderUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019, GigaSpaces Technologies, Inc. All Rights Reserved.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.insightedge.internal.utils;
17 |
18 | import com.gigaspaces.api.InternalApi;
19 | import com.gigaspaces.start.ClasspathBuilder;
20 | import com.gigaspaces.start.SystemLocations;
21 | import org.jini.rio.boot.ServiceClassLoader;
22 |
23 | import java.net.MalformedURLException;
24 | import java.nio.file.Path;
25 | import java.util.function.Predicate;
26 |
27 | /**
28 | * @author Niv Ingberg
29 | * @since 14.2
30 | */
31 | @InternalApi
32 | public class ClassLoaderUtils {
33 | public static ClasspathBuilder getSparkClassPath() {
34 | return getSparkClassPath(ClassLoaderUtils::sparkJarsFilter);
35 | }
36 |
37 | public static ClasspathBuilder getSparkClassPath(Predicate sparkJarsFilter) {
38 | return new ClasspathBuilder()
39 | //.appendPlatformJars("scala")
40 | .appendJars(SystemLocations.singleton().sparkHome().resolve("jars"), sparkJarsFilter);
41 | }
42 |
43 | private static boolean sparkJarsFilter(Path path) {
44 | String jarName = path.getFileName().toString();
45 | return !jarName.startsWith("xerces");
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/insightedge-core/src/main/java/org/insightedge/internal/utils/SparkSessionUtils.java:
--------------------------------------------------------------------------------
1 | package org.insightedge.internal.utils;
2 |
3 | import com.gigaspaces.api.InternalApi;
4 | import org.apache.spark.TaskContext;
5 | import org.apache.spark.sql.SparkSession;
6 | import scala.Option;
7 |
8 | import java.util.concurrent.ExecutionException;
9 | import java.util.concurrent.Executors;
10 | import java.util.concurrent.Future;
11 |
12 | /**
13 | * @author Niv Ingberg
14 | * @since 14.2
15 | */
16 | @InternalApi
17 | public class SparkSessionUtils {
18 | public static Option getDefaultSparkSession() {
19 | Option session = SparkSession.getDefaultSession();
20 | if (session.isDefined())
21 | return session;
22 | if (TaskContext.get() != null) {
23 | Future