Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 90871200CB3 for ; Mon, 26 Jun 2017 23:23:19 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8F5F8160BF5; Mon, 26 Jun 2017 21:23:19 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D596C160BDA for ; Mon, 26 Jun 2017 23:23:18 +0200 (CEST) Received: (qmail 40940 invoked by uid 500); 26 Jun 2017 21:23:17 -0000 Mailing-List: contact commits-help@beam.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@beam.apache.org Delivered-To: mailing list commits@beam.apache.org Received: (qmail 40916 invoked by uid 99); 26 Jun 2017 21:23:17 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jun 2017 21:23:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EF26ADFE07; Mon, 26 Jun 2017 21:23:16 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: altay@apache.org To: commits@beam.apache.org Date: Mon, 26 Jun 2017 21:23:16 -0000 Message-Id: <70d42a23eaf84d2d85d7f52e8e299faf@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] beam git commit: Remove old deprecated PubSub code archived-at: Mon, 26 Jun 2017 21:23:19 -0000 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 Authored: Mon Jun 26 13:00:14 2017 -0700 Committer: Charles Chen 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//". - subscription: Optional existing Cloud Pub/Sub subscription to use in the - form "projects//subscriptions/". - 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'