Your not missing anything.

Are you speaking about being able to override defaults or being able to see
if the response from pipelineOptions.getY() is the default response?
Overriding defaults is tricky because many parts of the system call
options.getRunner(), now which default should be returned (what if two
other interfaces also provide a different default value that are not
related to each other)?

The issue with seeing if a response is the default response is how do you
expect a caller to interact with it. For example we could:
* add a isRunnerSet() method, adds many methods to the interfaces
* ask whether something is default by name or by method reference,
options.isSet("runner" / method), brittle to any name changes in options.

On Wed, May 10, 2017 at 5:44 AM, Rune Fevang <[email protected]> wrote:

> I'd like to modify my pipeline to default to run in Dataflow, but still be
> settable to a different runner on the command line. As far as I can tell
> there's no way of doing this outside of parsing the command line myself:
>
> - Creating my own extended PipelineOptions class with a different @Default
> annotation doesn't work, it fails with a message saying @Default must match
> between PipelineOptions classes.
> - Calling options.setRunner() doesn't work, as it will override whatever
> is on the command line, and as far as I can tell there's no way of doing
> this before parsing the command line.
> - Calling options.getRunner() and only setting the runner when it's the
> default makes it so you can no longer use the DirectRunner, as there's no
> way of telling the difference between an unset option and one set to
> DirectRunner explicitly.
>
> Am I missing something? And if not is this a use-case it makes sense to
> accommodate?
>
> Thanks,
> Rune
>

Reply via email to