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 92EA1200C4F for ; Sat, 1 Apr 2017 21:04:31 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 91847160BA2; Sat, 1 Apr 2017 19:04:31 +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 ECDA9160B78 for ; Sat, 1 Apr 2017 21:04:30 +0200 (CEST) Received: (qmail 34068 invoked by uid 500); 1 Apr 2017 19:04:30 -0000 Mailing-List: contact dev-help@apex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@apex.apache.org Delivered-To: mailing list dev@apex.apache.org Received: (qmail 34049 invoked by uid 99); 1 Apr 2017 19:04:29 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Apr 2017 19:04:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 68953C0158 for ; Sat, 1 Apr 2017 19:04:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.48 X-Spam-Level: X-Spam-Status: No, score=0.48 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=datatorrent-com.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 0qgUmf3u3FvX for ; Sat, 1 Apr 2017 19:04:26 +0000 (UTC) Received: from mail-pg0-f53.google.com (mail-pg0-f53.google.com [74.125.83.53]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 2AF915FDAA for ; Sat, 1 Apr 2017 19:04:26 +0000 (UTC) Received: by mail-pg0-f53.google.com with SMTP id g2so91160323pge.3 for ; Sat, 01 Apr 2017 12:04:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datatorrent-com.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:date:subject:message-id :references:in-reply-to:to; bh=bG96mhIhsVfuAZUAB/BZs+MiLowpMwvF0bXsDrVh35I=; b=volu7rpSsdbN5wWzZeOHkO2oW1bKSImyj5aQ5kYlcwTOnVQ6GFJHVJW7pNiDhQXZr3 XDasFBxZMRWNpTV2rAVVISh/L5x4+esTR21yV9NLjKsGoewt0fmpw45ICkWcMGpe2Omu 9G/kR/4wOKRMAm9dQcD6F9EIst69Q93sgTLIIj4I9eCCHSo4WI47CHZsxpmGzJy07AjZ wovBxxDGyk8Y+Xsg8jmMxM09/uCtvKqXcMNTL3FiC78FgLeui14FkB3K3kGuyIGWEKTw 7WT2osy0cLu5LqOe1Oi0kb1swFH7WRBJLr73C9TBLkCrghIQgdD3Lje3UXGTE9fVWXvB buaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version:date :subject:message-id:references:in-reply-to:to; bh=bG96mhIhsVfuAZUAB/BZs+MiLowpMwvF0bXsDrVh35I=; b=Wm+BZfEDVeNx0bLrdAg9tModG5MnltlKBsaN7aBZmfxshkASCVFGry0YY8R8m/FdUv PKv9kM7bzFI0kxh10ybF+qSvYo9t7b4VNGGnntdkX8HuJLZstaS4uxW+bvw1J2CM4Z5i rKpjaTlhyC7feWMsImqY99E7W7sNODtQa3daBhP2Z5XApglVKLolvFuuz4vCwBtEAN2u +mD19C5TwdlqQvhoeFGZt3SKRxuUlfIkMJ2mI2PRiYVRYUuNJGy2WWMyjoTqkJ3zC0aM Ouj/gwVpch7CSe2BAwm8BOxMGQ3rL8K6vcuuwpYzMH3Py08iuUPKyAe1/qlWAwkiTAwZ DeUg== X-Gm-Message-State: AFeK/H1TheCoo8FYlWpUtzSKs4bG7A7ARU9mh6kALaNb7gnN1ePZWD3v6xnDgJ0SER0NlntT X-Received: by 10.98.200.19 with SMTP id z19mr8458000pff.223.1491073464471; Sat, 01 Apr 2017 12:04:24 -0700 (PDT) Received: from ?IPv6:2600:1010:b04b:36f:5171:e14a:a34:7e9f? ([2600:1010:b04b:36f:5171:e14a:a34:7e9f]) by smtp.gmail.com with ESMTPSA id 123sm17359494pgh.21.2017.04.01.12.04.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Apr 2017 12:04:23 -0700 (PDT) From: Vlad Rozov Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Date: Sat, 1 Apr 2017 12:04:22 -0700 Subject: Re: open/close ports and active/inactive streams Message-Id: References: In-Reply-To: To: dev@apex.apache.org X-Mailer: iPhone Mail (14E277) archived-at: Sat, 01 Apr 2017 19:04:31 -0000 One of use cases is a batch application with multiple reduce/aggregate opera= tors. Thank you, Vlad =EF=D4=D0=D2=C1=D7=CC=C5=CE=CF =D3 iPhone > On Apr 1, 2017, at 10:23, Munagala Ramanath wrote: >=20 > What's a use case for this ? >=20 > Ram >=20 >> On Sat, Apr 1, 2017 at 8:12 AM, Vlad Rozov wrot= e: >>=20 >> All, >>=20 >> Currently Apex assumes that an operator can emit on any defined output >> port and all streams defined by a DAG are active. I'd like to propose an >> ability for an operator to open and close output ports. By default all >> ports defined by an operator will be open. In the case an operator for an= y >> reason decides that it will not emit tuples on the output port, it may >> close it. This will make the stream inactive and the application master m= ay >> undeploy the downstream (for that input stream) operators. If this leads t= o >> containers that don't have any active operators, those containers may be >> undeployed as well leading to better cluster resource utilization and >> better Apex elasticity. Later, the operator may be in a state where it >> needs to emit tuples on the closed port. In this case, it needs to re-ope= n >> the port and wait till the stream becomes active again before emitting >> tuples on that port. Making inactive stream active again, requires the >> application master to re-allocate containers and re-deploy the downstream= >> operators. >>=20 >> It should be also possible for an application designer to mark streams as= >> inactive when an application starts. This will allow the application mast= er >> avoid reserving all containers when the application starts. Later, the po= rt >> can be open and inactive stream become active. >>=20 >> Thank you, >>=20 >> Vlad >>=20 >>=20 >=20 >=20 > --=20 >=20 > _______________________________________________________ >=20 > Munagala V. Ramanath >=20 > Software Engineer >=20 > E: ram@datatorrent.com | M: (408) 331-5034 | Twitter: @UnknownRam >=20 > www.datatorrent.com | apex.apache.org