From commits-return-59150-archive-asf-public=cust-asf.ponee.io@beam.apache.org Fri Feb 23 01:27:19 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 5600818064E for ; Fri, 23 Feb 2018 01:27:19 +0100 (CET) Received: (qmail 76276 invoked by uid 500); 23 Feb 2018 00:27:18 -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 76267 invoked by uid 99); 23 Feb 2018 00:27:18 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Feb 2018 00:27:18 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id EC7DC1A05B5 for ; Fri, 23 Feb 2018 00:27:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -102.311 X-Spam-Level: X-Spam-Status: No, score=-102.311 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id mSXEdNxICYCG for ; Fri, 23 Feb 2018 00:27:17 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id D8C5E5F260 for ; Fri, 23 Feb 2018 00:27:16 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 2FCF5E00E9 for ; Fri, 23 Feb 2018 00:27:14 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id C066C27127 for ; Fri, 23 Feb 2018 00:27:04 +0000 (UTC) Date: Fri, 23 Feb 2018 00:27:00 +0000 (UTC) From: "Ahmet Altay (JIRA)" To: commits@beam.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (BEAM-3736) Add SetUp() and TearDown() for CombineFns MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/BEAM-3736?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:all-tabpanel ] Ahmet Altay updated BEAM-3736: ------------------------------ Component/s: beam-model > Add SetUp() and TearDown() for CombineFns > ----------------------------------------- > > Key: BEAM-3736 > URL: https://issues.apache.org/jira/browse/BEAM-3736 > Project: Beam > Issue Type: Improvement > Components: beam-model, sdk-py-core > Reporter: Chuan Yu Foo > Assignee: Ahmet Altay > Priority: Major > > I have a CombineFn that has=C2=A0a large amount of state that needs to be= loaded once before it can add_input or merge_combiners (for example, the C= ombineFn might=C2=A0load up a large lookup table used for combining).=C2=A0 > Right now, to=C2=A0initialise this state, for each of the methods, I chec= k if the state has already been initialised, and if not, I initialise it. I= t would be nice if CombineFn provided a SetUp() method that is called once = to initialise this state (and a corresponding TearDown() method to clean up= this state if necessary). -- This message was sent by Atlassian JIRA (v7.6.3#76005)