Uh oh!
There was an error while loading. Please reload this page.
Remove SparkPipelineOptionsFactory, SparkStreamingPipelineOptionsFactory - #167
Conversation
tgroh
commented
Apr 11, 2016
R: @amitsela |
lukecwik
commented
Apr 12, 2016
@amitsela: |
amitsela
commented
Apr 12, 2016
@lukecwik I guess SparkPipelineOptionsFactory.create() was a wrapper for PipelineOptionsFactory.as(SparkPipelineOptions.class). @tgroh It makes sense that if we provide a PipelineOptionsFactory.as wrapper to the Spark runner we should apply the SparkRunner there, but we should do the same in SparkStreamingPipelineOptionsFactory.create() So it's either letting the user choose the correct options as @lukecwik suggests: Or as @tgroh suggests: As the model writers, what is the correct way for a runner implementor to choose ? Which way we want the user to use this ? should he explicitly state the Runner or choosing the options will provide the correct runner ? |
tgroh
commented
Apr 12, 2016
Generally Pipeline authors should not have to use any runner-specific classes during pipeline construction or submission; so users should call neither Pipeline authors are responsible for selecting a runner, currently at or before the time of |
lukecwik
commented
Apr 12, 2016
+1 for Thomas Groh response On Tue, Apr 12, 2016 at 8:54 AM, Thomas Groh notifications@github.com
|
amitsela
commented
Apr 12, 2016
I can see your point, and it's true for PipelineOptionsFactory.fromArgs(String[]). so I guess it's +1 for me as well |
tgroh
commented
Apr 12, 2016
I've pushed a change to remove the factories, and fix up all of the tests in which they were used. If this commit is merged, the first in this PR should be discarded. |
kennknowles
commented
Apr 13, 2016
@tgroh I don't quite understand your last comment. Perhaps you could just rebase to exactly what you propose to merge? |
tgroh
commented
Apr 13, 2016
@kennknowles done. |
1fbe48e to
2f5be67Compareamitsela
commented
Apr 14, 2016
+1 for removing the factories as well |
2f5be67 to
95472e0ComparePipeline authors should generally not use any runner-specific classes, but instead should select the runner and appropriate configurations through the PipelineOptionsFactory.fromArgs() method. The runner can then obtain the appropriately typed PipelineOptions class as required and do any neccessary validation. Failing this, they should use the provided PipelineOptions#as() method to acquire the appropriately typed options. If required, users should construct SparkPipelineOptions via PipelineOptionsFactory.as(SparkPipelineOptions.class).
95472e0 to
11ba2b9Comparetgroh
commented
Apr 14, 2016
Rebased on top of beam. If there aren't any more comments, this is ready to merge, pending jenkins |
lukecwik
commented
Apr 14, 2016
LGTM |
…f-hosted runners (#23134) * Updating build_playground_backend workflow (#167) Co-authored-by: Elias Segundo <elias.segundo@luisrazo.local> * Added master changes in build_playground_backend to avoid merge conflicts * Reverted GO_VERSION and BEAM_VERSION to have the same as master build_playground_backend * Switching trigger to pull_request (#259) * Switching to pull_request * Removing ref from checkout Co-authored-by: Elias Segundo Antonio <eliassegundo.segundo@gmail.com> Co-authored-by: Elias Segundo <elias.segundo@luisrazo.local> Co-authored-by: elink22 <103056145+elink22@users.noreply.github.com> Co-authored-by: Danny McCormick <dannymccormick@google.com>
…f-hosted runners (apache#23134) * Updating build_playground_backend workflow (apache#167) Co-authored-by: Elias Segundo <elias.segundo@luisrazo.local> * Added master changes in build_playground_backend to avoid merge conflicts * Reverted GO_VERSION and BEAM_VERSION to have the same as master build_playground_backend * Switching trigger to pull_request (apache#259) * Switching to pull_request * Removing ref from checkout Co-authored-by: Elias Segundo Antonio <eliassegundo.segundo@gmail.com> Co-authored-by: Elias Segundo <elias.segundo@luisrazo.local> Co-authored-by: elink22 <103056145+elink22@users.noreply.github.com> Co-authored-by: Danny McCormick <dannymccormick@google.com>
Be sure to do all of the following to help us incorporate your contribution
quickly and easily:
[BEAM-<Jira issue #>] Description of pull requestmvn clean verify. (Even better, enableTravis-CI on your fork and ensure the whole test matrix passes).
number, if there is one.
Individual Contributor License Agreement.
The SparkPipelineOptionsFactory should ensure that the returned options
have Spark as the PipelineRunner.
Use the SparkPipelineOptionsFactory in the spark TfIdf test
Without using the SparkPipelineRunner explicitly, the Pipeline run with
the SparkRunner may have an unexpected graph due to runner-specific
interceptions of the Pipeline#apply method