Joshua Hyde created FLUME-2308:
----------------------------------

             Summary: Document requirements for custom source
                 Key: FLUME-2308
                 URL: https://issues.apache.org/jira/browse/FLUME-2308
             Project: Flume
          Issue Type: Improvement
          Components: Docs
            Reporter: Joshua Hyde
            Priority: Minor


I implemented my own custom source that extends 
{{org.apache.flume.source.AbstractSource}}; to my surprise, however, I saw this 
in my logs:

{noformat}
31 Jan 2014 15:40:11,289 ERROR [conf-file-poller-0] 
(org.apache.flume.node.AbstractConfigurationProvider.loadSources:366)  - Source 
basset_source has been removed due to an error during configuration
java.lang.IllegalArgumentException: No known runner type for source 
com.cerner.sentinel.flume.sources.basset.BassetSource{name:basset_source,state:IDLE}
        at org.apache.flume.SourceRunner.forSource(SourceRunner.java:54)
        at 
org.apache.flume.node.AbstractConfigurationProvider.loadSources(AbstractConfigurationProvider.java:355)
        at 
org.apache.flume.node.AbstractConfigurationProvider.getConfiguration(AbstractConfigurationProvider.java:102)
        at 
org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:140)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
{noformat}

The solution, it appears, is mentioned in [this StackOverflow 
question|http://stackoverflow.com/questions/13201893/flume-1-2-0-custom-source/13202095#13202095]:

{quote}i think i figured it out. The documentation on the Flume website does 
not mention a custom implementation should implement not the Source interface 
but either the EventDrivenSource or PollableSource interface.
{quote}

It would be helpful if this was, as mentioned, written in the user-facing 
documentation. :)



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to