public abstract class BaseSparkJobConfig
extends distributed.core.DistributedJobConfig
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COLT_JAR
The path to the colt.jar
|
static java.lang.String |
DEFAULT_HDFS_PORT |
static java.lang.String |
DEFAULT_MESOS_MASTER_PORT |
static java.lang.String |
DEFAULT_SPARK_MASTER_PORT |
static java.lang.String |
DISTRIBUTED_WEKA_BASE_JAR
The path to the distributedWekaBase.jar
|
static java.lang.String |
DISTRIBUTED_WEKA_SPARK_JAR
The path to the distributedWekaSpark.jar
|
static java.lang.String |
HADOOP_FS_DEFAULT_NAME |
static java.lang.String |
JCOMMON_JAR
The path to the jcommon jar
|
static java.lang.String |
JFREECHART_JAR
The path to the jfreechart jar
|
static java.lang.String |
LA4J_JAR
The path to the la4j.jar
|
static java.lang.String |
MASTER_HOST |
static java.lang.String |
MASTER_PORT |
static java.lang.String |
OPEN_CSV_JAR
The path to the opencsv.jar
|
static java.lang.String |
SPARK_HOME_DIR |
static java.lang.String |
TDIGEST_JAR
The path to the t-digest.jar
|
Constructor and Description |
---|
BaseSparkJobConfig() |
Modifier and Type | Method and Description |
---|---|
void |
addWekaLibrariesToSparkContext(org.apache.spark.api.java.JavaSparkContext context,
distributed.core.DistributedJob job)
Adds necessary Weka libraries to the supplied SparkContext
|
java.lang.String |
availableClusterMemoryTipText()
Tip text for this property.
|
double |
getAvailableClusterMemory()
Get the total available cluster memory.
|
org.apache.spark.api.java.JavaSparkContext |
getBaseSparkContext(java.lang.String jobName)
Gets a configured SparkContext
|
java.lang.String |
getDefaultPortForMaster()
Attempt to get a default port based on the master url
|
double |
getInMemoryDataOverheadFactor()
Get the overhead factor for data in memory.
|
java.lang.String |
getMasterHost()
Get the host for the master node.
|
java.lang.String |
getMasterPort()
Get the port for the master node.
|
double |
getMemoryFraction()
Get the fraction of Java heap to use for Spark's memory cache.
|
java.lang.String[] |
getOptions() |
java.lang.String |
getPathToWekaJar()
Get the path to the weka.jar file.
|
java.lang.String |
getSparkHomeDirectory()
Get the root directory of the spark installation on the slave nodes
|
java.lang.String |
getWekaPackages()
Get a comma separated list of the names of additional weka packages to use
with the job.
|
java.lang.String |
inMemoryDataOverheadFactorTipText()
Tip text for this property
|
java.util.Enumeration<Option> |
listOptions() |
java.lang.String |
masterHostTipText()
Tip text for this property
|
java.lang.String |
masterPortTipText()
Tool tip text for this property
|
java.lang.String |
memoryFractionTipText()
Tip text for this property.
|
java.lang.String |
pathToWekaJarTipText()
Tip text for this property
|
void |
setAvailableClusterMemory(double m)
Set the total available cluster memory.
|
void |
setInMemoryDataOverheadFactor(double f)
Set the overhead factor for data in memory.
|
void |
setMasterHost(java.lang.String host)
Set the host for the master node.
|
void |
setMasterPort(java.lang.String port)
Set the port for the master node.
|
void |
setMemoryFraction(double f)
Set the fraction of Java heap to use for Spark's memory cache.
|
void |
setOptions(java.lang.String[] options) |
void |
setPathToWekaJar(java.lang.String path)
Set the path to the weka.jar file.
|
void |
setSparkHomeDirectory(java.lang.String sparkHome)
Set the root directory of the spark installation on the slave nodes
|
void |
setWekaPackages(java.lang.String packages)
Set a comma separated list of the names of additional weka packages to use
with the job.
|
java.lang.String |
sparkHomeDirectoryTipText()
Tool tip text for this property
|
java.lang.String |
wekaPackagesTipText()
Tip text for this property.
|
public static final java.lang.String DISTRIBUTED_WEKA_SPARK_JAR
public static final java.lang.String DISTRIBUTED_WEKA_BASE_JAR
public static final java.lang.String OPEN_CSV_JAR
public static final java.lang.String JFREECHART_JAR
public static final java.lang.String JCOMMON_JAR
public static final java.lang.String COLT_JAR
public static final java.lang.String LA4J_JAR
public static final java.lang.String TDIGEST_JAR
public static final java.lang.String MASTER_HOST
public static final java.lang.String MASTER_PORT
public static final java.lang.String SPARK_HOME_DIR
public static final java.lang.String DEFAULT_SPARK_MASTER_PORT
public static final java.lang.String DEFAULT_MESOS_MASTER_PORT
public static final java.lang.String DEFAULT_HDFS_PORT
public static final java.lang.String HADOOP_FS_DEFAULT_NAME
public java.util.Enumeration<Option> listOptions()
listOptions
in interface OptionHandler
listOptions
in class distributed.core.DistributedJobConfig
public java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class distributed.core.DistributedJobConfig
public void setOptions(java.lang.String[] options) throws java.lang.Exception
setOptions
in interface OptionHandler
setOptions
in class distributed.core.DistributedJobConfig
java.lang.Exception
public java.lang.String masterHostTipText()
public java.lang.String getMasterHost()
public void setMasterHost(java.lang.String host)
host
- the host of the masterpublic java.lang.String masterPortTipText()
public java.lang.String getMasterPort()
public void setMasterPort(java.lang.String port)
port
- the port for the master nodepublic java.lang.String sparkHomeDirectoryTipText()
public java.lang.String getSparkHomeDirectory()
public void setSparkHomeDirectory(java.lang.String sparkHome)
sparkHome
- the root directory of the spark installation on the slave
nodespublic java.lang.String availableClusterMemoryTipText()
public double getAvailableClusterMemory()
public void setAvailableClusterMemory(double m)
m
- the total available cluster memory in Gbpublic java.lang.String inMemoryDataOverheadFactorTipText()
public double getInMemoryDataOverheadFactor()
public void setInMemoryDataOverheadFactor(double f)
f
- the overhead factory for data in memory.public java.lang.String memoryFractionTipText()
public double getMemoryFraction()
public void setMemoryFraction(double f)
f
- the fraction to usepublic java.lang.String pathToWekaJarTipText()
public java.lang.String getPathToWekaJar()
public void setPathToWekaJar(java.lang.String path)
path
- the path to the weka.jar.public java.lang.String wekaPackagesTipText()
public java.lang.String getWekaPackages()
public void setWekaPackages(java.lang.String packages)
packages
- a comma separated list of weka packages to use with the jobpublic java.lang.String getDefaultPortForMaster()
public org.apache.spark.api.java.JavaSparkContext getBaseSparkContext(java.lang.String jobName)
jobName
- the job name to set on the contextpublic void addWekaLibrariesToSparkContext(org.apache.spark.api.java.JavaSparkContext context, distributed.core.DistributedJob job) throws WekaException
context
- the context to add dependencies tojob
- the job that is using the contextWekaException
- if a problem occurs