You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by ro...@apache.org on 2016/12/23 04:22:53 UTC
[3/4] incubator-beam git commit: Add a depracated warning about
BlockingDataflowRunner.
Add a depracated warning about BlockingDataflowRunner.
Updated TestDataflowRunner to inherit from DataflowRunner.
Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/fd5bf2cd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/fd5bf2cd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/fd5bf2cd
Branch: refs/heads/python-sdk
Commit: fd5bf2cd0dec86faffaa73ab861486c7044b26f4
Parents: 68dd9b5
Author: Ahmet Altay <al...@google.com>
Authored: Thu Dec 22 13:30:16 2016 -0800
Committer: Robert Bradshaw <ro...@gmail.com>
Committed: Thu Dec 22 20:22:27 2016 -0800
----------------------------------------------------------------------
sdks/python/apache_beam/runners/runner.py | 7 ++++++-
sdks/python/apache_beam/runners/test/test_dataflow_runner.py | 4 ++--
2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/fd5bf2cd/sdks/python/apache_beam/runners/runner.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/runners/runner.py b/sdks/python/apache_beam/runners/runner.py
index 3558d41..3dc4d28 100644
--- a/sdks/python/apache_beam/runners/runner.py
+++ b/sdks/python/apache_beam/runners/runner.py
@@ -30,7 +30,7 @@ _KNOWN_DIRECT_RUNNERS = ('DirectRunner', 'EagerRunner')
_KNOWN_DATAFLOW_RUNNERS = ('DataflowRunner', 'BlockingDataflowRunner')
_KNOWN_TEST_RUNNERS = ('TestDataflowRunner',)
_ALL_KNOWN_RUNNERS = (
- _KNOWN_DIRECT_RUNNERS + _KNOWN_DATAFLOW_RUNNERS + _KNOWN_TEST_RUNNERS)
+ _KNOWN_DIRECT_RUNNERS + _KNOWN_DATAFLOW_RUNNERS + _KNOWN_TEST_RUNNERS)
def create_runner(runner_name):
@@ -55,6 +55,11 @@ def create_runner(runner_name):
'%s is deprecated, use %s instead.', runner_name, new_runner_name)
runner_name = new_runner_name
+ # TODO(BEAM-759): Remove when all BlockingDataflowRunner references are gone.
+ if runner_name == 'BlockingDataflowRunner':
+ logging.warning(
+ 'BlockingDataflowRunner is deprecated, use DataflowRunner instead.')
+
if runner_name in _KNOWN_DIRECT_RUNNERS:
runner_name = 'apache_beam.runners.direct.direct_runner.' + runner_name
elif runner_name in _KNOWN_DATAFLOW_RUNNERS:
http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/fd5bf2cd/sdks/python/apache_beam/runners/test/test_dataflow_runner.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/runners/test/test_dataflow_runner.py b/sdks/python/apache_beam/runners/test/test_dataflow_runner.py
index aaf5eb8..a58ab33 100644
--- a/sdks/python/apache_beam/runners/test/test_dataflow_runner.py
+++ b/sdks/python/apache_beam/runners/test/test_dataflow_runner.py
@@ -18,11 +18,11 @@
"""Wrapper of Beam runners that's built for running and verifying e2e tests."""
from apache_beam.internal import pickler
-from apache_beam.runners.dataflow_runner import DataflowPipelineRunner
+from apache_beam.runners.dataflow_runner import DataflowRunner
from apache_beam.utils.options import TestOptions
-class TestDataflowRunner(DataflowPipelineRunner):
+class TestDataflowRunner(DataflowRunner):
def __init__(self):
super(TestDataflowRunner, self).__init__(blocking=True)