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

        Hide
        Ashish Paliwal added a comment -
        Show
        Ashish Paliwal added a comment - Does this link helps http://flume.apache.org/FlumeDeveloperGuide.html#source
        Hide
        Joshua Hyde added a comment -

        Oh! Yes. Sorry, I could have sworn I tried to find mention of the interfaces before submitting this issue. That's just fine for doc.

        Show
        Joshua Hyde added a comment - Oh! Yes. Sorry, I could have sworn I tried to find mention of the interfaces before submitting this issue. That's just fine for doc.
        Hide
        Ashish Paliwal added a comment -

        No worries, Can we mark this issue as won't fix?

        Show
        Ashish Paliwal added a comment - No worries, Can we mark this issue as won't fix?
        Hide
        Joshua Hyde added a comment -

        Yes, indeed.

        Show
        Joshua Hyde added a comment - Yes, indeed.
        Hide
        Ashish Paliwal added a comment -

        The information is present in Developer Guide

        Show
        Ashish Paliwal added a comment - The information is present in Developer Guide

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development