[
https://issues.apache.org/jira/browse/FLUME-1366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alvaro Polo updated FLUME-1366:
-------------------------------
Description:
Sources, channels and sinks are designed to extend {{AbstractSource}},
{{AbstractChannel}} and {{AbstractSink}}, respectively. These classes implement
the basics of lifecycle state tracking for sources, channels or sinks. In all
them, that state is modified exclusively by invoking the {{start()}} and
{{stop()}} methods.
There is no possibility of setting the lifecycle state to {{ERROR}}. This would
be specially useful when override {{start()}} and {{stop()}} methods find an
error that impedes the element to be started or stopped.
My suggestion here is to add a new protected method {{void
setLifecycleState(LifecycleState)}} that allow concrete sources, channels and
sinks to report such a situation.
was:
Sources, channels and sinks are designed to extend `AbstractSource`,
`AbstractChannel` and `AbstractSink`, respectively. These classes implement the
basics of lifecycle state tracking for sources, channels or sinks. In all them,
that state is modified exclusively by invoking the `start()` and `stop()`
methods.
There is no possibility of setting the lifecycle state to `ERROR`. This would
be specially useful when override `start()` and `stop()` methods find an error
that impedes the element to be started or stopped.
My suggestion here is to add a new protected method `void
setLifecycleState(LifecycleState)` that allow concrete sources, channels and
sinks to report such a situation.
Description field updated due to invalid markup language used ;-)
> AbstractSource, AbstractChannel & AbstractSink should provide a protected
> method setLifecycleState()
> ----------------------------------------------------------------------------------------------------
>
> Key: FLUME-1366
> URL: https://issues.apache.org/jira/browse/FLUME-1366
> Project: Flume
> Issue Type: Improvement
> Components: Channel, Sinks+Sources
> Affects Versions: v1.2.0
> Reporter: Alvaro Polo
> Priority: Minor
>
> Sources, channels and sinks are designed to extend {{AbstractSource}},
> {{AbstractChannel}} and {{AbstractSink}}, respectively. These classes
> implement the basics of lifecycle state tracking for sources, channels or
> sinks. In all them, that state is modified exclusively by invoking the
> {{start()}} and {{stop()}} methods.
> There is no possibility of setting the lifecycle state to {{ERROR}}. This
> would be specially useful when override {{start()}} and {{stop()}} methods
> find an error that impedes the element to be started or stopped.
> My suggestion here is to add a new protected method {{void
> setLifecycleState(LifecycleState)}} that allow concrete sources, channels and
> sinks to report such a situation.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira