public class SparkAppJob extends AbstractModuleFixture<SparkAppJob>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_APP_JAR |
static java.lang.String |
DEFAULT_APP_SOURCE_JAR |
static java.lang.String |
DEFAULT_MAIN_CLASS |
static java.lang.String |
DEFAULT_MASTER |
static java.lang.String |
DEFAULT_NAME |
label
Constructor and Description |
---|
SparkAppJob(java.lang.String sparkAppName,
java.lang.String sparkAppJar,
java.lang.String sparkAppMainClass,
java.lang.String sparkMaster)
Construct a new SparkAppJob fixture using the provided spark app's name, jar,
main class and master.
|
Modifier and Type | Method and Description |
---|---|
java.net.URI |
getJarURI(java.lang.String jarLocation)
Construct the URI location of the jar
|
java.lang.String |
getSparkAppJar() |
java.lang.String |
getSparkAppJarSource() |
java.lang.String |
getSparkAppMainClass() |
java.lang.String |
getSparkAppName() |
java.lang.String |
getSparkMaster() |
SparkAppJob |
sparkAppJar(java.lang.String sparkAppJar)
Sets the location of the spark app jar
|
SparkAppJob |
sparkAppJarSource(java.lang.String sparkAppJarSource)
Sets the location of a source jar that can be copied to the target location where
XD can access the jar
|
SparkAppJob |
sparkAppMainClass(java.lang.String sparkAppMainClass)
Sets the package and class of spark app
|
SparkAppJob |
sparkAppName(java.lang.String sparkAppName)
Sets the spark App Name for the fixture
|
SparkAppJob |
sparkMaster(java.lang.String sparkMaster)
Sets The url of the spark master(spark://url:7077 or localhost[x]
|
java.lang.String |
toDSL()
Renders the default DSL for this fixture.
|
static SparkAppJob |
withDefaults()
Creates an instance of the SparkAppJob fixture using defaults.
|
label, toString
public static final java.lang.String DEFAULT_NAME
public static final java.lang.String DEFAULT_APP_JAR
public static final java.lang.String DEFAULT_MASTER
public static final java.lang.String DEFAULT_MAIN_CLASS
public static final java.lang.String DEFAULT_APP_SOURCE_JAR
public SparkAppJob(java.lang.String sparkAppName, java.lang.String sparkAppJar, java.lang.String sparkAppMainClass, java.lang.String sparkMaster)
sparkAppName
- the name of the spark appsparkAppJar
- the jar that contains the spark appsparkAppMainClass
- the package and class namesparkMaster
- either local[x] or the spark://URLpublic static SparkAppJob withDefaults()
public java.lang.String toDSL()
toDSL
in class AbstractModuleFixture<SparkAppJob>
public java.net.URI getJarURI(java.lang.String jarLocation)
jarLocation
- String location of the jarpublic SparkAppJob sparkAppName(java.lang.String sparkAppName)
sparkAppName
- the name for the spark apppublic SparkAppJob sparkAppJar(java.lang.String sparkAppJar)
sparkAppJar
- the location of the spark app jarpublic SparkAppJob sparkAppMainClass(java.lang.String sparkAppMainClass)
sparkAppMainClass
- the package and class of the spark apppublic SparkAppJob sparkMaster(java.lang.String sparkMaster)
sparkMaster
- the location of the spark master or localhostpublic SparkAppJob sparkAppJarSource(java.lang.String sparkAppJarSource)
sparkAppJarSource
- the location of the spark app jar.public java.lang.String getSparkAppName()
public java.lang.String getSparkAppJar()
public java.lang.String getSparkAppMainClass()
public java.lang.String getSparkMaster()
public java.lang.String getSparkAppJarSource()