beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rober...@apache.org
Subject [1/4] incubator-beam git commit: Remove the word 'Pipeline' from the PipelineRunner subclasses.
Date Fri, 23 Dec 2016 04:22:51 GMT
Repository: incubator-beam
Updated Branches:
  refs/heads/python-sdk 82d7f0f77 -> 9c37274dd


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/68dd9b5e/sdks/python/apache_beam/transforms/window_test.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/transforms/window_test.py b/sdks/python/apache_beam/transforms/window_test.py
index 012dde4..6c3c98e 100644
--- a/sdks/python/apache_beam/transforms/window_test.py
+++ b/sdks/python/apache_beam/transforms/window_test.py
@@ -131,7 +131,7 @@ class WindowTest(unittest.TestCase):
             | Map(lambda x: WindowedValue((key, x), x, [])))
 
   def test_sliding_windows(self):
-    p = Pipeline('DirectPipelineRunner')
+    p = Pipeline('DirectRunner')
     pcoll = self.timestamped_key_values(p, 'key', 1, 2, 3)
     result = (pcoll
               | 'w' >> WindowInto(SlidingWindows(period=2, size=4))
@@ -144,7 +144,7 @@ class WindowTest(unittest.TestCase):
     p.run()
 
   def test_sessions(self):
-    p = Pipeline('DirectPipelineRunner')
+    p = Pipeline('DirectRunner')
     pcoll = self.timestamped_key_values(p, 'key', 1, 2, 3, 20, 35, 27)
     result = (pcoll
               | 'w' >> WindowInto(Sessions(10))
@@ -157,7 +157,7 @@ class WindowTest(unittest.TestCase):
     p.run()
 
   def test_timestamped_value(self):
-    p = Pipeline('DirectPipelineRunner')
+    p = Pipeline('DirectRunner')
     result = (p
               | 'start' >> Create([(k, k) for k in range(10)])
               | Map(lambda (x, t): TimestampedValue(x, t))
@@ -169,7 +169,7 @@ class WindowTest(unittest.TestCase):
     p.run()
 
   def test_timestamped_with_combiners(self):
-    p = Pipeline('DirectPipelineRunner')
+    p = Pipeline('DirectRunner')
     result = (p
               # Create some initial test values.
               | 'start' >> Create([(k, k) for k in range(10)])

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/68dd9b5e/sdks/python/apache_beam/utils/options.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/utils/options.py b/sdks/python/apache_beam/utils/options.py
index 5ebb4b4..ff7da77 100644
--- a/sdks/python/apache_beam/utils/options.py
+++ b/sdks/python/apache_beam/utils/options.py
@@ -178,15 +178,15 @@ class PipelineOptions(HasDisplayData):
 
 class StandardOptions(PipelineOptions):
 
-  DEFAULT_RUNNER = 'DirectPipelineRunner'
+  DEFAULT_RUNNER = 'DirectRunner'
 
   @classmethod
   def _add_argparse_args(cls, parser):
     parser.add_argument(
         '--runner',
         help=('Pipeline runner used to execute the workflow. Valid values are '
-              'DirectPipelineRunner, DataflowPipelineRunner, '
-              'and BlockingDataflowPipelineRunner.'))
+              'DirectRunner, DataflowRunner, '
+              'and BlockingDataflowRunner.'))
     # Whether to enable streaming mode.
     parser.add_argument('--streaming',
                         default=False,
@@ -218,7 +218,7 @@ class TypeOptions(PipelineOptions):
                         action='store_true',
                         help='Enable type checking at pipeline execution '
                         'time. NOTE: only supported with the '
-                        'DirectPipelineRunner')
+                        'DirectRunner')
 
 
 class GoogleCloudOptions(PipelineOptions):

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/68dd9b5e/sdks/python/apache_beam/utils/pipeline_options_validator.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/utils/pipeline_options_validator.py b/sdks/python/apache_beam/utils/pipeline_options_validator.py
index ab42b65..c1243ce 100644
--- a/sdks/python/apache_beam/utils/pipeline_options_validator.py
+++ b/sdks/python/apache_beam/utils/pipeline_options_validator.py
@@ -105,8 +105,8 @@ class PipelineOptionsValidator(object):
     """True if pipeline will execute on the Google Cloud Dataflow service."""
     is_service_runner = (self.runner is not None and
                          type(self.runner).__name__ in [
-                             'DataflowPipelineRunner',
-                             'BlockingDataflowPipelineRunner',
+                             'DataflowRunner',
+                             'BlockingDataflowRunner',
                              'TestDataflowRunner'])
 
     dataflow_endpoint = (

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/68dd9b5e/sdks/python/apache_beam/utils/pipeline_options_validator_test.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/utils/pipeline_options_validator_test.py b/sdks/python/apache_beam/utils/pipeline_options_validator_test.py
index 49028c7..8878c3f 100644
--- a/sdks/python/apache_beam/utils/pipeline_options_validator_test.py
+++ b/sdks/python/apache_beam/utils/pipeline_options_validator_test.py
@@ -29,7 +29,7 @@ from hamcrest.core.base_matcher import BaseMatcher
 # Mock runners to use for validations.
 class MockRunners(object):
 
-  class DataflowPipelineRunner(object):
+  class DataflowRunner(object):
     pass
 
   class TestDataflowRunner(object):
@@ -75,7 +75,7 @@ class SetupTest(unittest.TestCase):
 
   def test_missing_required_options(self):
     options = PipelineOptions([''])
-    runner = MockRunners.DataflowPipelineRunner()
+    runner = MockRunners.DataflowRunner()
     validator = PipelineOptionsValidator(options, runner)
     errors = validator.validate()
 
@@ -96,7 +96,7 @@ class SetupTest(unittest.TestCase):
         options.append('--staging_location=' + staging_location)
 
       pipeline_options = PipelineOptions(options)
-      runner = MockRunners.DataflowPipelineRunner()
+      runner = MockRunners.DataflowRunner()
       validator = PipelineOptionsValidator(pipeline_options, runner)
       return validator
 
@@ -151,7 +151,7 @@ class SetupTest(unittest.TestCase):
         options.append('--project=' + project)
 
       pipeline_options = PipelineOptions(options)
-      runner = MockRunners.DataflowPipelineRunner()
+      runner = MockRunners.DataflowRunner()
       validator = PipelineOptionsValidator(pipeline_options, runner)
       return validator
 
@@ -179,7 +179,7 @@ class SetupTest(unittest.TestCase):
         options.append('--job_name=' + job_name)
 
       pipeline_options = PipelineOptions(options)
-      runner = MockRunners.DataflowPipelineRunner()
+      runner = MockRunners.DataflowRunner()
       validator = PipelineOptionsValidator(pipeline_options, runner)
       return validator
 
@@ -207,7 +207,7 @@ class SetupTest(unittest.TestCase):
         options.append('--num_workers=' + num_workers)
 
       pipeline_options = PipelineOptions(options)
-      runner = MockRunners.DataflowPipelineRunner()
+      runner = MockRunners.DataflowRunner()
       validator = PipelineOptionsValidator(pipeline_options, runner)
       return validator
 
@@ -241,27 +241,27 @@ class SetupTest(unittest.TestCase):
             'expected': False,
         },
         {
-            'runner': MockRunners.DataflowPipelineRunner(),
+            'runner': MockRunners.DataflowRunner(),
             'options': ['--dataflow_endpoint=https://another.service.com'],
             'expected': False,
         },
         {
-            'runner': MockRunners.DataflowPipelineRunner(),
+            'runner': MockRunners.DataflowRunner(),
             'options': ['--dataflow_endpoint=https://another.service.com/'],
             'expected': False,
         },
         {
-            'runner': MockRunners.DataflowPipelineRunner(),
+            'runner': MockRunners.DataflowRunner(),
             'options': ['--dataflow_endpoint=https://dataflow.googleapis.com'],
             'expected': True,
         },
         {
-            'runner': MockRunners.DataflowPipelineRunner(),
+            'runner': MockRunners.DataflowRunner(),
             'options': ['--dataflow_endpoint=https://dataflow.googleapis.com/'],
             'expected': True,
         },
         {
-            'runner': MockRunners.DataflowPipelineRunner(),
+            'runner': MockRunners.DataflowRunner(),
             'options': [],
             'expected': True,
         },

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/68dd9b5e/sdks/python/run_postcommit.sh
----------------------------------------------------------------------
diff --git a/sdks/python/run_postcommit.sh b/sdks/python/run_postcommit.sh
index 1652936..968d4f9 100755
--- a/sdks/python/run_postcommit.sh
+++ b/sdks/python/run_postcommit.sh
@@ -73,7 +73,7 @@ SDK_LOCATION=$(find dist/apache-beam-sdk-*.tar.gz)
 # Run ValidatesRunner tests on Google Cloud Dataflow service
 python setup.py nosetests \
   -a ValidatesRunner --test-pipeline-options=" \
-    --runner=BlockingDataflowPipelineRunner \
+    --runner=BlockingDataflowRunner \
     --project=$PROJECT \
     --staging_location=$GCS_LOCATION/staging-validatesrunner-test \
     --temp_location=$GCS_LOCATION/temp-validatesrunner-test \
@@ -86,7 +86,7 @@ python -m apache_beam.examples.wordcount \
   --output $GCS_LOCATION/py-wordcount-cloud \
   --staging_location $GCS_LOCATION/staging-wordcount \
   --temp_location $GCS_LOCATION/temp-wordcount \
-  --runner BlockingDataflowPipelineRunner \
+  --runner BlockingDataflowRunner \
   --job_name $JOBNAME_E2E \
   --project $PROJECT \
   --sdk_location $SDK_LOCATION \


Mime
View raw message