From issues-return-1088-archive-asf-public=cust-asf.ponee.io@flume.apache.org Fri Sep 17 06:45:11 2021 Return-Path: X-Original-To: archive-asf-public@mx-eu-03.ponee.io Delivered-To: archive-asf-public@mx-eu-03.ponee.io Received: from mx-eu-01.ponee.io (mx-eu-01.ponee.io [94.130.169.78]) by mx-eu-03.ponee.io (Postfix) with ESMTP id D99A53E69D for ; Fri, 17 Sep 2021 06:45:11 +0200 (CEST) Received: by mx-eu-01.ponee.io (Postfix) id BE122180676; Fri, 17 Sep 2021 04:45:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-he-de.apache.org (mxout1-he-de.apache.org [95.216.194.37]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 5370618065C for ; Fri, 17 Sep 2021 06:45:11 +0200 (CEST) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-he-de.apache.org (ASF Mail Server at mxout1-he-de.apache.org) with SMTP id 7592A64797 for ; Fri, 17 Sep 2021 04:45:05 +0000 (UTC) Received: (qmail 34583 invoked by uid 500); 17 Sep 2021 04:45:04 -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 34517 invoked by uid 99); 17 Sep 2021 04:45:03 -0000 Received: from mailrelay1-he-de.apache.org (HELO mailrelay1-he-de.apache.org) (116.203.21.61) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Sep 2021 04:45:03 +0000 Received: from jira2-he-de.apache.org (jira2-he-de.apache.org [168.119.33.54]) by mailrelay1-he-de.apache.org (ASF Mail Server at mailrelay1-he-de.apache.org) with ESMTPS id DDACE3E8F0 for ; Fri, 17 Sep 2021 04:45:01 +0000 (UTC) Received: from jira2-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira2-he-de.apache.org (ASF Mail Server at jira2-he-de.apache.org) with ESMTP id 2586AC81F9A for ; Fri, 17 Sep 2021 04:45:01 +0000 (UTC) Date: Fri, 17 Sep 2021 04:45:01 +0000 (UTC) From: "Sabyasachi (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: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLUME-2894?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1741= 6447#comment-17416447 ]=20 Sabyasachi commented on FLUME-2894: ----------------------------------- I see actual PR JUST CLOSED NOT MERGED Yet somehow Jira is marked as RESOLVED=C2=A0:) If anyone here would be kind enough to explain what is going on that would = be extremely extremely helpful. Many Thanks in advance > 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 > > Time Spent: 10m > Remaining Estimate: 0h > > 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=3Dsolid} > Map supervisedProcesses; > ... > supervisedProcesses =3D new HashMap(); > ... > @Override > public synchronized void stop() { > ... > for (final Entry entry : supervisedProces= ses > .entrySet()) { > if (entry.getKey().getLifecycleState().equals(LifecycleState.START)= ) { > entry.getValue().status.desiredState =3D 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 ar= e stopped -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@flume.apache.org For additional commands, e-mail: issues-help@flume.apache.org