[ 
https://issues.apache.org/jira/browse/FLUME-1273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mike Percy updated FLUME-1273:
------------------------------

    Affects Version/s:     (was: v1.1.0)
    
> Components left in partially-configured state if RuntimeException thrown in 
> configure()
> ---------------------------------------------------------------------------------------
>
>                 Key: FLUME-1273
>                 URL: https://issues.apache.org/jira/browse/FLUME-1273
>             Project: Flume
>          Issue Type: Bug
>            Reporter: Mike Percy
>
> If a component, such as a Channel or a Sink, throws a RuntimeException (such 
> as IllegalArgumentException or IllegalStateException) in its configure() 
> method to indicate an error, some strange, non-deterministic stuff happens to 
> the rest of the components in the system according to the ordering of the 
> components in the configuration properties hash.
> Example:
> 1. Channel throws IllegalArgumentException in configure() method
> 2. Throw propagates to PropertiesFileConfigurationProvider.loadChannels(), 
> not caught inside loop (some components not configured)
> 3. Propagates to load() method in same class, Sources/Sinks not configured, 
> RuntimeException not caught
> 4. Ends up getting all the way to the 
> AbstractFileConfigurationProvider$FileWatcherRunnable.run() method, which 
> simply logs an error message("Failed to load configuration data. Exception 
> follows.") with a stack trace and continues. So the components will get 
> started, etc.
> The behavior should probably be changed to something like the following:
> 1. Exception should be caught and logged at the 
> PropertiesFileConfigurationProvider.loadChannels() level (along with each 
> other component type such as Source, Sink, etc).
> 2. At the beginning of PropertiesFileConfigurationProvider.loadChannels(), we 
> should call conf.getChannels.clear() and only add the components to the conf 
> hashes if they were indeed configured successfully. Either that, or at least 
> set them to an unconfigured state that the start routine needs to respect so 
> avoid starting unconfigured or misconfigured components.
> This work needs to be done carefully to avoid any unintended consequences of 
> changing this core logic.

--
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

        

Reply via email to