public final class TestSparkRunner extends PipelineRunner<SparkPipelineResult>
Pipeline p = [logic for pipeline creation]
SparkPipelineResult result = (SparkPipelineResult) p.run();
To create a pipeline runner to run against a different spark cluster, with a custom master url
we would do the following:
Pipeline p = [logic for pipeline creation]
SparkPipelineOptions options = SparkPipelineOptionsFactory.create();
options.setSparkMaster("spark://host:port");
SparkPipelineResult result = (SparkPipelineResult) p.run();
Modifier and Type | Method and Description |
---|---|
static TestSparkRunner |
fromOptions(PipelineOptions options) |
SparkPipelineResult |
run(Pipeline pipeline)
Processes the given
Pipeline , potentially asynchronously, returning a runner-specific
type of result. |
public static TestSparkRunner fromOptions(PipelineOptions options)
public SparkPipelineResult run(Pipeline pipeline)
PipelineRunner
Pipeline
, potentially asynchronously, returning a runner-specific
type of result.run
in class PipelineRunner<SparkPipelineResult>