flume-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sabyasachi Pain (Jira)" <j...@apache.org>
Subject [jira] [Comment Edited] (FLUME-2894) Flume components should stop in the correct order (graceful shutdown)
Date Fri, 17 Sep 2021 04:44:00 GMT

    [ https://issues.apache.org/jira/browse/FLUME-2894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17416442#comment-17416442
] 

Sabyasachi Pain edited comment on FLUME-2894 at 9/17/21, 4:43 AM:
------------------------------------------------------------------

I see actual PR JUST CLOSED NOT MERGED

Yet somehow Jira is marked as RESOLVED :)

If anyone here would be kind enough to explain what is going on that would be extremely extremely
helpful.

Many Thanks in advance


was (Author: sabya1981):
I see actual PR JUST CLOSED NOT MERGED

Yet somehow Jira is marked as RESOLVED :)

If anyone here would be kind enough to explain what is going on that would be extremely extremely
helpful.

> 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=solid}
> Map<LifecycleAware, Supervisoree> supervisedProcesses;
> ...
> supervisedProcesses = new HashMap<LifecycleAware, Supervisoree>();
> ...
> @Override
>   public synchronized void stop() {
>   ...
>   for (final Entry<LifecycleAware, Supervisoree> 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
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@flume.apache.org
For additional commands, e-mail: issues-help@flume.apache.org


Mime
View raw message