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 EE073200C00 for ; Wed, 18 Jan 2017 16:31:20 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id ECA50160B3A; Wed, 18 Jan 2017 15:31:20 +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 1F1CA160B34 for ; Wed, 18 Jan 2017 16:31:19 +0100 (CET) Received: (qmail 97302 invoked by uid 500); 18 Jan 2017 15:31:19 -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 97290 invoked by uid 99); 18 Jan 2017 15:31: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; Wed, 18 Jan 2017 15:31: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 781391A01C5 for ; Wed, 18 Jan 2017 15:31:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.48 X-Spam-Level: ** X-Spam-Status: No, score=2.48 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, 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: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=datatorrent-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id F0OvmeFr33WR for ; Wed, 18 Jan 2017 15:31:16 +0000 (UTC) Received: from mail-qt0-f171.google.com (mail-qt0-f171.google.com [209.85.216.171]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id D958D5FCA2 for ; Wed, 18 Jan 2017 15:31:15 +0000 (UTC) Received: by mail-qt0-f171.google.com with SMTP id l7so14990054qtd.1 for ; Wed, 18 Jan 2017 07:31:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datatorrent-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=GFp459z4NjD8XWnEWmb9yqJMxAkGnKoCmNHU9lICT4U=; b=eHc1wSBsRmYBR9nkjnPPhsN0vXmWfsrkx20V3pCsgcT5LfzZjkaXr9gsigmyJ4Yg9C y1Vu2+H3Nl0WnV9oVSKVQX/Z5ZwpqjhPW6Ws226Js5UFUWztuqDeAfcOQG5XMkL/OrBR l5nRB761I5nFIQyKhkY4SSIUns9+BKGNIhtszYPUxBxQ4xLlq2csMGOk8G5SV9Jh59Hc toE3NWC1+xMhyefB+Sf7nTZRJoWeB9i2Az6yYK7VPBY6sqFr7QZh8ixGCUgDsdsqqS0E sqPkyEaQNwhlURHSTVEz/q+DmSsMLmvYpS05KHG30artcLT7Yq8SmdrizQkZRh9G1rcB y+bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=GFp459z4NjD8XWnEWmb9yqJMxAkGnKoCmNHU9lICT4U=; b=M12oKvl3GrZI9OQr4d13ctXs2r5Gec9M3xWmK5MMGY9zBMn0y9e/FsiTZgpXQlUHV9 2dqJsQ3Hog3RwQPTHNdrK410IR5UqcBr68ZZlLqr8AjejxzrggvqJ2PW2WCgrMr4GhV0 b6DCTethWsDd8tKrz46zqaePhD0/i12XNzOc4Zt/vqdYTT5xC8D2TRkj/3hpuLW7Jt/J dSEhYqls+4tpVh15YMF0/gcknI3be+mKfk/wc8Sy2zm4R3ZV8r09LyI3gtMzV1E8BOUS q5s2SLrpia01hgopcNly4G0VxOsuccQv+/0fNrxMj62ahpJ/kMGHxjgdK3oL50OLomoy JtdA== X-Gm-Message-State: AIkVDXKnEwN/k5sOSgQgZnURiOK/w7xZlG6cByRwyTTuVTdHf1nCzqXjbqPy9zNoDrfXURmMbFIGlp9U8Q7P5JFv X-Received: by 10.237.62.44 with SMTP id l41mr3667398qtf.16.1484753471993; Wed, 18 Jan 2017 07:31:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.55.151.69 with HTTP; Wed, 18 Jan 2017 07:31:11 -0800 (PST) In-Reply-To: References: From: Amol Kekre Date: Wed, 18 Jan 2017 07:31:11 -0800 Message-ID: Subject: Re: Shutdown of an Apex app To: dev@apex.apache.org Content-Type: multipart/alternative; boundary=001a1140e70a4757330546601b0a archived-at: Wed, 18 Jan 2017 15:31:21 -0000 --001a1140e70a4757330546601b0a Content-Type: text/plain; charset=UTF-8 Agreed on input adapter way. Enforcing all input adapters send shutdown on the same window cannot be guaranteed, so there will be a corner case where windows are not aligned. An ask from Stram to send shutdown way in the future reduces the scope of the corner case, but then defeats the purpose. Even for a single logical input adapter, all its partitions will need to issue shutdown control tuple. So a best case attempt to align within at a window should be done. Thks Amol On Wed, Jan 18, 2017 at 12:14 AM, Bhupesh Chawda wrote: > Yes, Amol. That will be the case for a kill type of shutdown. > But for graceful shutdown, it is important that each operator in the DAG > processes exactly the same amount of data. That is the reason the shutdown > needs to start at input operators and stop their functioning as the first > step. Thereafter the control tuple can propagate down the DAG and shutdown > operators as and when they encounter the control tuple. > > ~ Bhupesh > > On Wed, Jan 18, 2017 at 1:10 PM, Amol Kekre wrote: > > > Can be done by sending "shutdown" message via heartbeat to Stram. Then on > > stram can shutdown the entire app > > > > Thks > > Amol > > > > > > On Tue, Jan 17, 2017 at 11:05 PM, Bhupesh Chawda < > bhupesh@datatorrent.com> > > wrote: > > > > > Yes Ajay, for a graceful shutdown, the data sent out should be > processed. > > > > > > On Wed, Jan 18, 2017 at 12:19 PM, AJAY GUPTA > > wrote: > > > > > > > +1 to idea. > > > > > > > > Will this ensure downstream operators to process all data received > > before > > > > shutdown is called? > > > > Also, how do we plan to handle cases where 2 sub-DAGs merge to a > single > > > > operator somewhere downstream, and an operator in one of the sub-DAGs > > > sends > > > > ShutdownException. > > > > > > > > > > > > Ajay > > > > > > > > On Wed, Jan 18, 2017 at 12:00 PM, Bhupesh Chawda < > > > bhupesh@datatorrent.com> > > > > wrote: > > > > > > > > > This JIRA is to stop the DAG in a crude manner, based on an error > > > > > condition. I think this might also need similar functionality as an > > > error > > > > > condition can occur anywhere in the DAG. > > > > > > > > > > Perhaps we can modify the same JIRA to include a graceful + > > ungraceful > > > > > (kill) shutdown from any operator in the DAG. > > > > > > > > > > ~ Bhupesh > > > > > > > > > > On Wed, Jan 18, 2017 at 11:55 AM, Tushar Gosavi < > > > tushar@datatorrent.com> > > > > > wrote: > > > > > > > > > > > I think this would be a great addition for batch use cases or use > > > > > > cases were DAG needs to be shutdown after detecting some > > > > > > completion/error condition through the operator. We have one Jira > > > > > > Opened for such functionality > > > > > > https://issues.apache.org/jira/browse/APEXCORE-503. > > > > > > > > > > > > - Tushar. > > > > > > > > > > > > > > > > > > On Wed, Jan 18, 2017 at 11:45 AM, Bhupesh Chawda > > > > > > wrote: > > > > > > > Hi All, > > > > > > > > > > > > > > Currently we can shutdown an Apex app in the following ways: > > > > > > > 1. Throw ShutdownException() from *all* the input operators > > > > > > > 2. Use Apex CLI to shutdown an app using the YARN App Id > > > > > > > > > > > > > > I think we should have some way of shutting down an application > > > from > > > > > > within > > > > > > > an operator. It is not always true that the trigger for > shutdown > > is > > > > > sent > > > > > > by > > > > > > > the input operator only. Sometimes, an end condition may be > > > detected > > > > by > > > > > > > some operator in the DAG which wants the processing to end. > Such > > a > > > > > > > shutdown, although triggered from some intermediate operator in > > the > > > > > DAG, > > > > > > > should guarantee graceful shut down of the application. > > > > > > > > > > > > > > Thoughts? > > > > > > > > > > > > > > ~ Bhupesh > > > > > > > > > > > > > > > > > > > > > --001a1140e70a4757330546601b0a--