Re: BEAM-3304 - Go trigger question

2021-03-24 Thread Robert Burke
Thanks for your patience, my email client is presently a mess.

In this case, the root issue is the configuration of your development set
up for Go. It's running the code, but depending on packages in the GO_PATH
or GO_ROOT, not your github client.

To solve this, follow the instructions at
https://github.com/apache/beam/blob/master/sdks/go/README.md#contributing-to-the-go-sdk
which explains the correct nesting. The short version is that your git
client needs to be *inside* the GO_PATH.

This has certainly become more inconvenient Since Go 1.16 has release last
month, as one needs to set GO111MODULES=auto (see
https://blog.golang.org/go116-module-changes for details), as it's been set
to on. If you're using an older version of Go (at least, I know as far back
as Go 1.12 works as that's what the automated tests use.), that shouldn't
be an issue.

The Go SDK is not currently 100% module compliant, but that is being worked
on in Q2.  I'm less certain about how that would change development though.
Would probably require some local overrides in the go.mod file... I digress.

 https://cwiki.apache.org/confluence/display/BEAM/Go+Tips has further tips
for setting up and developing the SDK itself, and testing.

Robert B



On Mon, 22 Mar 2021 at 16:11, César Cueva Orozco 
wrote:

> Hello Team,
>
> We are trying to test the following behavior by replacing the *default*
> trigger in WindowingStrategy:
>
> https://github.com/apache/beam/blob/3b2b07d251f58ec00a0056ac368b443fea2f10d9/sdks/go/pkg/beam/core/runtime/graphx/translate.go
>
> Before:
> ws := {
> WindowFn: windowFn,
> MergeStatus: pipepb.MergeStatus_NON_MERGING,
> AccumulationMode: pipepb.AccumulationMode_DISCARDING,
> WindowCoderId: windowCoderId,
> Trigger: {
> *Trigger: _Default_{*
> * Default: _Default{},*
> * },*
> },
>
> After:
> ws := {
> WindowFn: windowFn,
> MergeStatus: pipepb.MergeStatus_NON_MERGING,
> AccumulationMode: pipepb.AccumulationMode_DISCARDING,
> WindowCoderId: windowCoderId,
> Trigger: {
> *Trigger: _Always_{*
> * Always: _Always{},*
> * },*
> },
>
> Despite having changed the default code, the behavior doesn't change. See
> the below console output:
>
> windowing_strategies:
> key: "w0"
> value: <
>   window_fn: <
> urn: "beam:window_fn:global_windows:v1"
>   >
>   merge_status: NON_MERGING
>   window_coder_id: "c4"
>
> *trigger:  >
>   >
>   accumulation_mode: DISCARDING
>   output_time: END_OF_WINDOW
>   closing_behavior: EMIT_IF_NONEMPTY
>   OnTimeBehavior: FIRE_ALWAYS
>   environment_id: "go"
>
> This is just to check if the runner acknowledges the change before we
> implement different triggers.
>
> Please let us know if we are missing something.
>
> Thank you,
> -Cesar
>
>
>
>
>
>
>
>
>
> *This email and its contents (including any attachments) are being sent
> toyou on the condition of confidentiality and may be protected by
> legalprivilege. Access to this email by anyone other than the intended
> recipientis unauthorized. If you are not the intended recipient, please
> immediatelynotify the sender by replying to this message and delete the
> materialimmediately from your system. Any further use, dissemination,
> distributionor reproduction of this email is strictly prohibited. Further,
> norepresentation is made with respect to any content contained in this
> email.*


BEAM-3304 - Go trigger question

2021-03-22 Thread César Cueva Orozco
Hello Team,

We are trying to test the following behavior by replacing the *default*
trigger in WindowingStrategy:
https://github.com/apache/beam/blob/3b2b07d251f58ec00a0056ac368b443fea2f10d9/sdks/go/pkg/beam/core/runtime/graphx/translate.go

Before:
ws := {
WindowFn: windowFn,
MergeStatus: pipepb.MergeStatus_NON_MERGING,
AccumulationMode: pipepb.AccumulationMode_DISCARDING,
WindowCoderId: windowCoderId,
Trigger: {
*Trigger: _Default_{*
* Default: _Default{},*
* },*
},

After:
ws := {
WindowFn: windowFn,
MergeStatus: pipepb.MergeStatus_NON_MERGING,
AccumulationMode: pipepb.AccumulationMode_DISCARDING,
WindowCoderId: windowCoderId,
Trigger: {
*Trigger: _Always_{*
* Always: _Always{},*
* },*
},

Despite having changed the default code, the behavior doesn't change. See
the below console output:

windowing_strategies:
key: "w0"
value: <
  window_fn: <
urn: "beam:window_fn:global_windows:v1"
  >
  merge_status: NON_MERGING
  window_coder_id: "c4"

*trigger: 
  >
  accumulation_mode: DISCARDING
  output_time: END_OF_WINDOW
  closing_behavior: EMIT_IF_NONEMPTY
  OnTimeBehavior: FIRE_ALWAYS
  environment_id: "go"

This is just to check if the runner acknowledges the change before we
implement different triggers.

Please let us know if we are missing something.

Thank you,
-Cesar

-- 
*This email and its contents (including any attachments) are being sent to
you on the condition of confidentiality and may be protected by legal
privilege. Access to this email by anyone other than the intended recipient
is unauthorized. If you are not the intended recipient, please immediately
notify the sender by replying to this message and delete the material
immediately from your system. Any further use, dissemination, distribution
or reproduction of this email is strictly prohibited. Further, no
representation is made with respect to any content contained in this email.*