[BEAM-664] Update Java MinimalWordCount instructions#336
[BEAM-664] Update Java MinimalWordCount instructions#336alex-filatov wants to merge 1 commit intoapache:asf-sitefrom
Conversation
…dcoded to run only on DirectRunner
|
Hey @alex-filatov, could you explain this more? Should we instead change the example to not-hardcode to work only one runner. cc: @kennknowles in case he has more context. |
|
@aaltay @kennknowles Current instructions are broken: you'll get exception if you try to run Java MinimalWordCount using e.g. Flink runner. Checking history, it appears this was a deliberate change. Commit message: "This makes it easy to immediately run, and removes various
Not sure. Beam model is independent of the runners and could be explained separately (using Direct Runner) from the real runners. I would change all examples to use Direct Runner only and provide separate instructions how to specify and configure different runners. IMO this decoupling would make docs simpler. |
|
The context is that just to keep it truly "minimal" as a demonstration of how pithy we could get things with Java 8, we hardcode everything. The idea is that if you want to experiment with it you edit the code. It is just the tiniest example. |
|
That was back in a time where runners needed more special consideration than they do now. As long as the code for |
|
@kennknowles My understanding so far is, {{MinimalWordCount}} needs pipeline options for runner, input, output to be able to run with other runners. We do not want to do that to complicate things. In that case, making this documentation changes makes sense. Is this accurate? |
|
Actually it has harcoded input and hardcoded output. I do think that you could set the runner via pipeline options and it would work. |
|
Does the hardcoded input/output work for all runners as it is? |
|
I'm actually not sure. FWIW this PR is clearly an improvement as the bits it deletes are passing command line args that don't exist. I expect they would actually cause the command to fail. |
|
I agree that this PR is an improvement. I can merge it unless there is an objection. cc: @melap |
|
LGTM |
MinimalWordCount in Java is intentionally hardcoded to run only on DirectRunner.