Repository: beam Updated Branches: refs/heads/master 16f87f49f -> 1ea1de4aa
Remove old deprecated PubSub code Project: http://git-wip-us.apache.org/repos/asf/beam/repo Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/926f9495 Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/926f9495 Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/926f9495 Branch: refs/heads/master Commit: 926f949580c3a21df72a8836feda1f6b947850ec Parents: 16f87f4 Author: Charles Chen <c...@google.com> Authored: Mon Jun 26 13:00:14 2017 -0700 Committer: Charles Chen <c...@google.com> Committed: Mon Jun 26 13:00:55 2017 -0700 ---------------------------------------------------------------------- sdks/python/apache_beam/io/gcp/pubsub.py | 71 +------------------- .../runners/dataflow/internal/dependency.py | 2 +- 2 files changed, 2 insertions(+), 71 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/beam/blob/926f9495/sdks/python/apache_beam/io/gcp/pubsub.py ---------------------------------------------------------------------- diff --git a/sdks/python/apache_beam/io/gcp/pubsub.py b/sdks/python/apache_beam/io/gcp/pubsub.py index 6dc1528..fabe296 100644 --- a/sdks/python/apache_beam/io/gcp/pubsub.py +++ b/sdks/python/apache_beam/io/gcp/pubsub.py @@ -33,8 +33,7 @@ from apache_beam.transforms import Map from apache_beam.transforms.display import DisplayDataItem -__all__ = ['ReadStringsFromPubSub', 'WriteStringsToPubSub', - 'PubSubSource', 'PubSubSink'] +__all__ = ['ReadStringsFromPubSub', 'WriteStringsToPubSub'] class ReadStringsFromPubSub(PTransform): @@ -160,71 +159,3 @@ class _PubSubPayloadSink(dataflow_io.NativeSink): def writer(self): raise NotImplementedError( 'PubSubPayloadSink is not supported in local execution.') - - -class PubSubSource(dataflow_io.NativeSource): - """Deprecated: do not use. - - Source for reading from a given Cloud Pub/Sub topic. - - Attributes: - topic: Cloud Pub/Sub topic in the form "/topics/<project>/<topic>". - subscription: Optional existing Cloud Pub/Sub subscription to use in the - form "projects/<project>/subscriptions/<subscription>". - id_label: The attribute on incoming Pub/Sub messages to use as a unique - record identifier. When specified, the value of this attribute (which can - be any string that uniquely identifies the record) will be used for - deduplication of messages. If not provided, Dataflow cannot guarantee - that no duplicate data will be delivered on the Pub/Sub stream. In this - case, deduplication of the stream will be strictly best effort. - coder: The Coder to use for decoding incoming Pub/Sub messages. - """ - - def __init__(self, topic, subscription=None, id_label=None, - coder=coders.StrUtf8Coder()): - self.topic = topic - self.subscription = subscription - self.id_label = id_label - self.coder = coder - - @property - def format(self): - """Source format name required for remote execution.""" - return 'pubsub' - - def display_data(self): - return {'id_label': - DisplayDataItem(self.id_label, - label='ID Label Attribute').drop_if_none(), - 'topic': - DisplayDataItem(self.topic, - label='Pubsub Topic'), - 'subscription': - DisplayDataItem(self.subscription, - label='Pubsub Subscription').drop_if_none()} - - def reader(self): - raise NotImplementedError( - 'PubSubSource is not supported in local execution.') - - -class PubSubSink(dataflow_io.NativeSink): - """Deprecated: do not use. - - Sink for writing to a given Cloud Pub/Sub topic.""" - - def __init__(self, topic, coder=coders.StrUtf8Coder()): - self.topic = topic - self.coder = coder - - @property - def format(self): - """Sink format name required for remote execution.""" - return 'pubsub' - - def display_data(self): - return {'topic': DisplayDataItem(self.topic, label='Pubsub Topic')} - - def writer(self): - raise NotImplementedError( - 'PubSubSink is not supported in local execution.') http://git-wip-us.apache.org/repos/asf/beam/blob/926f9495/sdks/python/apache_beam/runners/dataflow/internal/dependency.py ---------------------------------------------------------------------- diff --git a/sdks/python/apache_beam/runners/dataflow/internal/dependency.py b/sdks/python/apache_beam/runners/dataflow/internal/dependency.py index e656600..6d4a703 100644 --- a/sdks/python/apache_beam/runners/dataflow/internal/dependency.py +++ b/sdks/python/apache_beam/runners/dataflow/internal/dependency.py @@ -73,7 +73,7 @@ from apache_beam.options.pipeline_options import SetupOptions # Update this version to the next version whenever there is a change that will # require changes to the execution environment. # This should be in the beam-[version]-[date] format, date is optional. -BEAM_CONTAINER_VERSION = 'beam-2.1.0-20170601' +BEAM_CONTAINER_VERSION = 'beam-2.1.0-20170626' # Standard file names used for staging files. WORKFLOW_TARBALL_FILE = 'workflow.tar.gz'