IN - Type of input objectOUT - Type of output object@Beta public abstract class SparkCompute<IN,OUT> extends Object implements PipelineConfigurable, Serializable
| Modifier and Type | Field and Description |
|---|---|
static String |
PLUGIN_TYPE |
| Constructor and Description |
|---|
SparkCompute() |
| Modifier and Type | Method and Description |
|---|---|
void |
configurePipeline(PipelineConfigurer pipelineConfigurer)
Configure a pipeline.
|
void |
initialize(SparkExecutionPluginContext context)
Initialize the plugin.
|
abstract org.apache.spark.api.java.JavaRDD<OUT> |
transform(SparkExecutionPluginContext context,
org.apache.spark.api.java.JavaRDD<IN> input)
Transform the input and return the output to be sent to the next stage in the pipeline.
|
public static final String PLUGIN_TYPE
public void configurePipeline(PipelineConfigurer pipelineConfigurer) throws IllegalArgumentException
configurePipeline in interface PipelineConfigurablepipelineConfigurer - the configurer used to add required datasets and streamsIllegalArgumentException - if the given config is invalidpublic void initialize(SparkExecutionPluginContext context) throws Exception
transform(SparkExecutionPluginContext, JavaRDD)
are made.context - SparkExecutionPluginContext for this jobException - if there is an error initializingpublic abstract org.apache.spark.api.java.JavaRDD<OUT> transform(SparkExecutionPluginContext context, org.apache.spark.api.java.JavaRDD<IN> input) throws Exception
context - SparkExecutionPluginContext for this jobinput - input data to be transformedException - if there is an error during this method invocationCopyright © 2017 Cask Data, Inc. Licensed under the Apache License, Version 2.0.