Package org.apache.wayang.spark.platform
Class SparkPlatform
java.lang.Object
org.apache.wayang.core.platform.Platform
org.apache.wayang.spark.platform.SparkPlatform
Platform for Apache Spark.-
Field Summary
FieldsFields inherited from class org.apache.wayang.core.platform.Platform
jsonSerializer -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureDefaults(Configuration configuration) Configure default settings for this instance, e.g., to be able to createLoadProfileToTimeConverters.createLoadProfileToTimeConverter(Configuration configuration) createTimeToCostConverter(Configuration configuration) Creates aTimeToCostConverterfor this instance.longgetInitializeMillis(Configuration configuration) Get the time necessary to initialize this instance and use it for execution.static SparkPlatformgetSparkContext(Job job) Configures the single maintainedJavaSparkContextaccording to thejoband returns it.voidwarmUp(Configuration configuration) Warm up this instance.Methods inherited from class org.apache.wayang.core.platform.Platform
createExecutor, getConfigurationName, getName, isSinglePlatformExecutionPossible, load, toString
-
Field Details
-
INITIALIZATION_MS_CONFIG_KEY
- See Also:
-
-
Method Details
-
getInstance
-
getSparkContext
Configures the single maintainedJavaSparkContextaccording to thejoband returns it.- Returns:
- a
SparkContextReferencewrapping theJavaSparkContext
-
configureDefaults
Description copied from class:PlatformConfigure default settings for this instance, e.g., to be able to createLoadProfileToTimeConverters.- Specified by:
configureDefaultsin classPlatform- Parameters:
configuration- that should be configured
-
createLoadProfileToTimeConverter
- Specified by:
createLoadProfileToTimeConverterin classPlatform- Returns:
- a default
LoadProfileToTimeConverter
-
createTimeToCostConverter
Description copied from class:PlatformCreates aTimeToCostConverterfor this instance.- Specified by:
createTimeToCostConverterin classPlatform- Parameters:
configuration- configures theTimeToCostConverter- Returns:
- the
TimeToCostConverter
-
getExecutorFactory
- Specified by:
getExecutorFactoryin classPlatform
-
warmUp
Description copied from class:PlatformWarm up this instance. -
getInitializeMillis
Description copied from class:PlatformGet the time necessary to initialize this instance and use it for execution.- Overrides:
getInitializeMillisin classPlatform- Returns:
- the milliseconds required to initialize this instance
-