From issues-return-184-archive-asf-public=cust-asf.ponee.io@flume.apache.org Thu May 3 14:21:04 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 C2206180625 for ; Thu, 3 May 2018 14:21:03 +0200 (CEST) Received: (qmail 3926 invoked by uid 500); 3 May 2018 12:21:02 -0000 Mailing-List: contact issues-help@flume.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flume.apache.org Delivered-To: mailing list issues@flume.apache.org Received: (qmail 3915 invoked by uid 99); 3 May 2018 12:21:02 -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; Thu, 03 May 2018 12:21:02 +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 607581A2405 for ; Thu, 3 May 2018 12:21:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -101.511 X-Spam-Level: X-Spam-Status: No, score=-101.511 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, 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-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 ATjucqTS9YmM for ; Thu, 3 May 2018 12:21:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 477485FB19 for ; Thu, 3 May 2018 12:21:01 +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 BE27EE12BF for ; Thu, 3 May 2018 12:21:00 +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 79C212129C for ; Thu, 3 May 2018 12:21:00 +0000 (UTC) Date: Thu, 3 May 2018 12:21:00 +0000 (UTC) From: "Hudson (JIRA)" To: issues@flume.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLUME-2894) Flume components should stop in the correct order (graceful shutdown) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLUME-2894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16462357#comment-16462357 ] Hudson commented on FLUME-2894: ------------------------------- SUCCESS: Integrated in Jenkins build Flume-trunk-hbase-1 #344 (See [https://builds.apache.org/job/Flume-trunk-hbase-1/344/]) FLUME-2894: Flume components should stop in the correct order (graceful (szaboferee: [http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=62c59a68dad22b3ce6145c1a4ae26ffa3418fe32]) * (edit) flume-ng-node/src/main/java/org/apache/flume/node/Application.java > Flume components should stop in the correct order (graceful shutdown) > --------------------------------------------------------------------- > > Key: FLUME-2894 > URL: https://issues.apache.org/jira/browse/FLUME-2894 > Project: Flume > Issue Type: Bug > Components: Channel, Node, Sinks+Sources > Affects Versions: 1.6.0, 1.7.0 > Reporter: Piotr Wiecek > Assignee: Laxman > Priority: Major > Fix For: 1.9.0 > > Attachments: FLUME-2894.patch > > > Flume components should be stopped in the right way: > * stop the sources (in order to not receiving further notifications), > * wait until all events within the channels are consumed by the sinks, > * stop the channels and the sinks. > Currently, the shutdown hook stops the components in a random manner. > E.g.: SINK, CHANNEL, SOURCE. > Components are stored in the HashMap: > {code:borderStyle=solid} > Map supervisedProcesses; > ... > supervisedProcesses = new HashMap(); > ... > @Override > public synchronized void stop() { > ... > for (final Entry entry : supervisedProcesses > .entrySet()) { > if (entry.getKey().getLifecycleState().equals(LifecycleState.START)) { > entry.getValue().status.desiredState = LifecycleState.STOP; > entry.getKey().stop(); > } > } > .... > {code} > The problems which we can have: > * not all Events will be consumed (Sink will be stopped first) > * Source will continue to accept messages even though other components are stopped -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@flume.apache.org For additional commands, e-mail: issues-help@flume.apache.org