Keep your code simple and rely on the runner caching the value locally so
it should be very cheap to access. If you have a performance issue due to a
runner lacking caching, it would be good to hear about it so we could file
a JIRA about it.
On Mon, May 6, 2019 at 4:24 PM Kenneth Knowles wrote:
A singleton view in the global window and no triggering does have just a
single immutable value. (It really ought to have an updated value in the
presence of triggers, but I believe instead you will receive a crash. I
haven't tested.)
In general, a side input yields one value per window. Dataflow
I have a singleton view in a global window that is read from a DoFn. I'm
curious if its "correct" to cache that value from the view, or if I need to
read it every time.
As a (simplified) example, if I were to generate the view as such:
input.getPipeline