apache_beam.runners.direct.direct_userstate module

Support for user state in the BundleBasedDirectRunner.

class apache_beam.runners.direct.direct_userstate.DirectRuntimeState(state_spec, state_tag, current_value_accessor)[source]

Bases: RuntimeState

static for_spec(state_spec, state_tag, current_value_accessor)[source]
class apache_beam.runners.direct.direct_userstate.ReadModifyWriteRuntimeState(state_spec, state_tag, current_value_accessor)[source]

Bases: DirectRuntimeState, ReadModifyWriteRuntimeState

read()[source]
write(value)[source]
clear()[source]
is_cleared()[source]
is_modified()[source]
class apache_beam.runners.direct.direct_userstate.BagRuntimeState(state_spec, state_tag, current_value_accessor)[source]

Bases: DirectRuntimeState, BagRuntimeState

read()[source]
add(value)[source]
clear()[source]
class apache_beam.runners.direct.direct_userstate.SetRuntimeState(state_spec, state_tag, current_value_accessor)[source]

Bases: DirectRuntimeState, SetRuntimeState

read()[source]
add(value)[source]
clear()[source]
is_modified()[source]
class apache_beam.runners.direct.direct_userstate.CombiningValueRuntimeState(state_spec, state_tag, current_value_accessor)[source]

Bases: DirectRuntimeState, CombiningValueRuntimeState

Combining value state interface object passed to user code.

read()[source]
add(value)[source]
clear()[source]
finalize()[source]
class apache_beam.runners.direct.direct_userstate.DirectUserStateContext(step_context, dofn, key_coder)[source]

Bases: UserStateContext

userstate.UserStateContext for the BundleBasedDirectRunner.

The DirectUserStateContext buffers up updates that are to be committed by the TransformEvaluator after running a DoFn.

get_timer(timer_spec: TimerSpec, key, window, timestamp, pane) RuntimeTimer[source]
get_state(state_spec, key, window)[source]
commit()[source]
reset()[source]