|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Class Summary | |
---|---|
SparkLauncher | Launcher for Spark applications. |
Library for launching Spark applications.
This library allows applications to launch Spark programmatically. There's only one entry point to the library - theSparkLauncher
class.
To launch a Spark application, just instantiate a SparkLauncher
and configure the application to run. For example:
import org.apache.spark.launcher.SparkLauncher;
public class MyLauncher {
public static void main(String[] args) throws Exception {
Process spark = new SparkLauncher()
.setAppResource("/my/app.jar")
.setMainClass("my.spark.app.Main")
.setMaster("local")
.setConf(SparkLauncher.DRIVER_MEMORY, "2g")
.launch();
spark.waitFor();
}
}
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |