Flume
  1. Flume
  2. FLUME-2308

Document requirements for custom source

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Docs
    • Labels:
      None

      Description

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

      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.example.MySource{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)
      

      The solution, it appears, is mentioned in this StackOverflow question:

      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.

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

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Joshua Hyde
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development