public class InProcessLauncher extends AbstractLauncher<InProcessLauncher>
Use this class to start Spark applications programmatically. Applications launched using this class will run in the same process as the caller.
Because Spark only supports a single active instance of
SparkContext per JVM, code
that uses this class should be careful about which applications are launched. It's recommended
that this launcher only be used to launch applications in cluster mode.
Also note that, when running applications in client mode, JVM-related configurations (like driver memory or configs which modify the driver's class path) do not take effect. Logging configuration is also inherited from the parent application.
|Constructor and Description|
|Modifier and Type||Method and Description|
Starts a Spark application.
addAppArgs, addFile, addJar, addPyFile, addSparkArg, addSparkArg, setAppName, setAppResource, setConf, setDeployMode, setMainClass, setMaster, setPropertiesFile, setRemote, setVerbose
public SparkAppHandle startApplication(SparkAppHandle.Listener... listeners) throws java.io.IOException
listeners- Listeners to add to the handle before the app is launched.