[ https://issues.apache.org/jira/browse/FLUME-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510329#comment-13510329 ]
Hari Shreedharan commented on FLUME-1766: ----------------------------------------- It seems like we check for hostname being null in the start method. I checked the configure method where the configuration is validated, so that the source can be removed if the hostname is null (the config system will remove the source if it throws an exception in the configure method). So we should move the check for hostname being non-null to the configure method, so the config system can remove the component when the configure method throws. Jeff - it would be nice to add that to this patch as well. Otherwise the lifecycle supervisor will try to start the component(there is some hack I put in for an error state, so it does not throw every 3 seconds - but I'd rather remove the component than use up resources). > AvroSource throws confusing exception when configured without a port > -------------------------------------------------------------------- > > Key: FLUME-1766 > URL: https://issues.apache.org/jira/browse/FLUME-1766 > Project: Flume > Issue Type: Bug > Components: Sinks+Sources > Affects Versions: v1.3.0 > Reporter: Mike Percy > Assignee: Jeff Lord > Priority: Minor > Labels: newbie > Fix For: v1.4.0 > > Attachments: FLUME-1766-1.patch, FLUME-1766-2.patch > > > 2012-12-03 18:25:08,210 (conf-file-poller-0) [DEBUG - > org.apache.flume.source.DefaultSourceFactory.create(DefaultSourceFactory.java:74)] > Creating instance of source src-1, type AVRO > 2012-12-03 18:25:08,235 (conf-file-poller-0) [ERROR - > org.apache.flume.conf.file.AbstractFileConfigurationProvider$FileWatcherRunnable.run(AbstractFileConfigurationProvider.java:204)] > Failed to load configuration data. Exception follows. > java.lang.NumberFormatException: null > at java.lang.Integer.parseInt(Integer.java:417) > at java.lang.Integer.parseInt(Integer.java:499) > at org.apache.flume.source.AvroSource.configure(AvroSource.java:126) > at org.apache.flume.conf.Configurables.configure(Configurables.java:41) > at > org.apache.flume.conf.properties.PropertiesFileConfigurationProvider.loadSources(PropertiesFileConfigurationProvider.java:323) > at > org.apache.flume.conf.properties.PropertiesFileConfigurationProvider.load(PropertiesFileConfigurationProvider.java:222) > at > org.apache.flume.conf.file.AbstractFileConfigurationProvider.doLoad(AbstractFileConfigurationProvider.java:123) > at > org.apache.flume.conf.file.AbstractFileConfigurationProvider.access$300(AbstractFileConfigurationProvider.java:38) > at > org.apache.flume.conf.file.AbstractFileConfigurationProvider$FileWatcherRunnable.run(AbstractFileConfigurationProvider.java:202) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) > at > java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:680) > ^C2012-12-03 18:25:17,989 (node-shutdownHook) [INFO - > org.apache.flume.node.FlumeNode.stop(FlumeNode.java:67)] Flume node stopping > - agent -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira