You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lc...@apache.org on 2017/11/10 18:11:39 UTC
[1/4] beam git commit: Set save_main_session to True for csv module
Repository: beam
Updated Branches:
refs/heads/release-2.2.0 36ae989af -> d28ee9b9f
Set save_main_session to True for csv module
Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/22dcd730
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/22dcd730
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/22dcd730
Branch: refs/heads/release-2.2.0
Commit: 22dcd730ec49e554927a41f250e0b55282fce0fe
Parents: 36ae989
Author: David Cavazos <dc...@google.com>
Authored: Wed Nov 8 15:32:03 2017 -0800
Committer: Valentyn Tymofieiev <va...@google.com>
Committed: Thu Nov 9 13:51:27 2017 -0800
----------------------------------------------------------------------
sdks/python/apache_beam/examples/complete/game/user_score.py | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/beam/blob/22dcd730/sdks/python/apache_beam/examples/complete/game/user_score.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/examples/complete/game/user_score.py b/sdks/python/apache_beam/examples/complete/game/user_score.py
index cf9976d..79bf39a 100644
--- a/sdks/python/apache_beam/examples/complete/game/user_score.py
+++ b/sdks/python/apache_beam/examples/complete/game/user_score.py
@@ -61,6 +61,8 @@ import logging
import apache_beam as beam
from apache_beam.metrics.metric import Metrics
+from apache_beam.options.pipeline_options import PipelineOptions
+from apache_beam.options.pipeline_options import SetupOptions
class ParseGameEventFn(beam.DoFn):
@@ -137,6 +139,12 @@ def run(argv=None):
args, pipeline_args = parser.parse_known_args(argv)
+ options = PipelineOptions(pipeline_args)
+
+ # We use the save_main_session option because one or more DoFn's in this
+ # workflow rely on global context (e.g., a module imported at module level).
+ options.view_as(SetupOptions).save_main_session = True
+
with beam.Pipeline(argv=pipeline_args) as p:
(p # pylint: disable=expression-not-assigned
| 'ReadInputText' >> beam.io.ReadFromText(args.input)
[4/4] beam git commit: Cherrypicks for 2 2 0 rc 4
Posted by lc...@apache.org.
Cherrypicks for 2 2 0 rc 4
This closes #4109
Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/d28ee9b9
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/d28ee9b9
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/d28ee9b9
Branch: refs/heads/release-2.2.0
Commit: d28ee9b9f0b7d50f1efca729380d7168efddd218
Parents: 36ae989 13dcec9
Author: Luke Cwik <lc...@google.com>
Authored: Fri Nov 10 10:11:28 2017 -0800
Committer: Luke Cwik <lc...@google.com>
Committed: Fri Nov 10 10:11:28 2017 -0800
----------------------------------------------------------------------
sdks/python/apache_beam/examples/complete/game/user_score.py | 8 ++++++++
sdks/python/apache_beam/transforms/core.py | 1 +
sdks/python/apache_beam/utils/urns.py | 2 +-
3 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
[3/4] beam git commit: Update urns.py
Posted by lc...@apache.org.
Update urns.py
Fix typo in GLOBAL_WINDOW_CODER urn constant.
Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/13dcec9c
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/13dcec9c
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/13dcec9c
Branch: refs/heads/release-2.2.0
Commit: 13dcec9c9b455e481afd23d6f53f42628b2954fe
Parents: bddb869
Author: tvalentyn <tv...@users.noreply.github.com>
Authored: Wed Nov 8 17:31:43 2017 -0800
Committer: Valentyn Tymofieiev <va...@google.com>
Committed: Thu Nov 9 14:06:20 2017 -0800
----------------------------------------------------------------------
sdks/python/apache_beam/utils/urns.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/beam/blob/13dcec9c/sdks/python/apache_beam/utils/urns.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/utils/urns.py b/sdks/python/apache_beam/utils/urns.py
index 2aeaa53..92bf437 100644
--- a/sdks/python/apache_beam/utils/urns.py
+++ b/sdks/python/apache_beam/utils/urns.py
@@ -55,7 +55,7 @@ INTERVAL_WINDOW_CODER = "urn:beam:coders:interval_window:0.1"
ITERABLE_CODER = "urn:beam:coders:stream:0.1"
KV_CODER = "urn:beam:coders:kv:0.1"
LENGTH_PREFIX_CODER = "urn:beam:coders:length_prefix:0.1"
-GLOBAL_WINDOW_CODER = "urn:beam:coders:urn:beam:coders:global_window:0.1"
+GLOBAL_WINDOW_CODER = "urn:beam:coders:global_window:0.1"
WINDOWED_VALUE_CODER = "urn:beam:coders:windowed_value:0.1"
[2/4] beam git commit: Set OnTimeBehavior in windowing strategy to
FIRE_ALWAYS.
Posted by lc...@apache.org.
Set OnTimeBehavior in windowing strategy to FIRE_ALWAYS.
This fixes python side of https://issues.apache.org/jira/browse/BEAM-2961.
Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/bddb8699
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/bddb8699
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/bddb8699
Branch: refs/heads/release-2.2.0
Commit: bddb86996b5083134ff87abcac1a8db49ef6ba09
Parents: 22dcd73
Author: tvalentyn <tv...@users.noreply.github.com>
Authored: Thu Nov 9 13:16:24 2017 -0800
Committer: Valentyn Tymofieiev <va...@google.com>
Committed: Thu Nov 9 13:55:00 2017 -0800
----------------------------------------------------------------------
sdks/python/apache_beam/transforms/core.py | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/beam/blob/bddb8699/sdks/python/apache_beam/transforms/core.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/transforms/core.py b/sdks/python/apache_beam/transforms/core.py
index 41e20ba..ba60ced 100644
--- a/sdks/python/apache_beam/transforms/core.py
+++ b/sdks/python/apache_beam/transforms/core.py
@@ -1528,6 +1528,7 @@ class Windowing(object):
output_time=self.timestamp_combiner,
# TODO(robertwb): Support EMIT_IF_NONEMPTY
closing_behavior=beam_runner_api_pb2.ClosingBehavior.EMIT_ALWAYS,
+ OnTimeBehavior=beam_runner_api_pb2.OnTimeBehavior.FIRE_ALWAYS,
allowed_lateness=0)
@staticmethod