<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Error in Configuring Custom Flume Source in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-in-Configuring-Custom-Flume-Source/m-p/26294#M5528</link>
    <description>&lt;P&gt;I have created a custom source for flume and copied the jar files in the following locations :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mkdir -p /usr/lib/flume-ng/plugins.d/MyFlumeSource/lib/MyFlumeSource.jar&lt;BR /&gt;mkdir -p /var/lib/flume-ng/plugins.d/MyFlumeSource/lib/MyFlumeSource.jar&lt;BR /&gt;&lt;BR /&gt;chown -R flume:flume /usr/lib/flume-ng/&lt;BR /&gt;chown -R flume:flume /var/lib/flume-ng/&lt;BR /&gt;&lt;BR /&gt;Also in /etc/flume-ng/conf/flume-env.sh&lt;BR /&gt;&lt;BR /&gt;FLUME_CLASSPATH="/usr/lib/flume-ng/plugins.d/MyFlumeSource/lib/MyFlumeSource.jar"&lt;BR /&gt;&lt;BR /&gt;Updated the Flume configuration file as&lt;BR /&gt;&lt;BR /&gt;# Name the components on this agent&lt;BR /&gt;tail1.sources = seq-source&lt;BR /&gt;tail1.channels = mem-channel&lt;BR /&gt;tail1.sinks = hdfs-sink&lt;/P&gt;&lt;P&gt;# Describe/configure Source&lt;BR /&gt;tail1.sources.seq-source.type = org.custom.flume.source.MySource&lt;/P&gt;&lt;P&gt;# Describe the sink&lt;BR /&gt;tail1.sinks.hdfs-sink.type = hdfs&lt;BR /&gt;tail1.sinks.hdfs-sink.hdfs.path = /user/flume&lt;BR /&gt;tail1.sinks.hdfs-sink.hdfs.filePrefix = log&lt;BR /&gt;tail1.sinks.hdfs-sink.hdfs.rollInterval = 0&lt;BR /&gt;tail1.sinks.hdfs-sink.hdfs.rollCount = 10000&lt;BR /&gt;tail1.sinks.hdfs-sink.hdfs.fileType = DataStream&lt;/P&gt;&lt;P&gt;# Use a channel which buffers events in file&lt;BR /&gt;tail1.channels.mem-channel.type = memory&lt;BR /&gt;tail1.channels.mem-channel.capacity = 1000&lt;BR /&gt;tail1.channels.mem-channel.transactionCapacity = 100&lt;/P&gt;&lt;P&gt;# Bind the source and sink to the channel&lt;BR /&gt;tail1.sources.seq-source.channels = mem-channel&lt;BR /&gt;tail1.sinks.hdfs-sink.channel = mem-channel&lt;/P&gt;&lt;P&gt;Trying to run the flume agent as&lt;/P&gt;&lt;P&gt;flume-ng agent --conf /var/lib/flume-ng/plugins.d/MyFlumeSource/lib/MyFlumeSource.jar --conf-file /etc/flume-ng/conf/flume-conf.properties --name tail1&lt;/P&gt;&lt;P&gt;flume-ng agent --conf-file /etc/flume-ng/conf/flume-conf.properties --name tail1&lt;/P&gt;&lt;P&gt;In both cases I am getting the following error :&lt;/P&gt;&lt;P&gt;ERROR node.PollingPropertiesFileConfigurationProvider: Failed to load configuration data. Exception follows.&lt;BR /&gt;org.apache.flume.FlumeException: Unable to create source: seq-source, type: org.custom.flume.source.MySource, class: org.custom.flume.source.MySource&lt;BR /&gt;at org.apache.flume.source.DefaultSourceFactory.create(DefaultSourceFactory.java:48)&lt;BR /&gt;at org.apache.flume.node.AbstractConfigurationProvider.loadSources(AbstractConfigurationProvider.java:322)&lt;BR /&gt;at org.apache.flume.node.AbstractConfigurationProvider.getConfiguration(AbstractConfigurationProvider.java:97)&lt;BR /&gt;at org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:140)&lt;BR /&gt;at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)&lt;BR /&gt;at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)&lt;BR /&gt;at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)&lt;BR /&gt;at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)&lt;BR /&gt;at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)&lt;BR /&gt;at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)&lt;BR /&gt;at java.lang.Thread.run(Thread.java:745)&lt;BR /&gt;Caused by: java.lang.InstantiationException&lt;BR /&gt;at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:48)&lt;BR /&gt;at java.lang.reflect.Constructor.newInstance(Constructor.java:526)&lt;BR /&gt;at java.lang.Class.newInstance(Class.java:379)&lt;BR /&gt;at org.apache.flume.source.DefaultSourceFactory.create(DefaultSourceFactory.java:44)&lt;BR /&gt;... 10 more&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If any one aware of it please help me.&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 09:26:12 GMT</pubDate>
    <dc:creator>Losetty</dc:creator>
    <dc:date>2022-09-16T09:26:12Z</dc:date>
    <item>
      <title>Error in Configuring Custom Flume Source</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-in-Configuring-Custom-Flume-Source/m-p/26294#M5528</link>
      <description>&lt;P&gt;I have created a custom source for flume and copied the jar files in the following locations :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;mkdir -p /usr/lib/flume-ng/plugins.d/MyFlumeSource/lib/MyFlumeSource.jar&lt;BR /&gt;mkdir -p /var/lib/flume-ng/plugins.d/MyFlumeSource/lib/MyFlumeSource.jar&lt;BR /&gt;&lt;BR /&gt;chown -R flume:flume /usr/lib/flume-ng/&lt;BR /&gt;chown -R flume:flume /var/lib/flume-ng/&lt;BR /&gt;&lt;BR /&gt;Also in /etc/flume-ng/conf/flume-env.sh&lt;BR /&gt;&lt;BR /&gt;FLUME_CLASSPATH="/usr/lib/flume-ng/plugins.d/MyFlumeSource/lib/MyFlumeSource.jar"&lt;BR /&gt;&lt;BR /&gt;Updated the Flume configuration file as&lt;BR /&gt;&lt;BR /&gt;# Name the components on this agent&lt;BR /&gt;tail1.sources = seq-source&lt;BR /&gt;tail1.channels = mem-channel&lt;BR /&gt;tail1.sinks = hdfs-sink&lt;/P&gt;&lt;P&gt;# Describe/configure Source&lt;BR /&gt;tail1.sources.seq-source.type = org.custom.flume.source.MySource&lt;/P&gt;&lt;P&gt;# Describe the sink&lt;BR /&gt;tail1.sinks.hdfs-sink.type = hdfs&lt;BR /&gt;tail1.sinks.hdfs-sink.hdfs.path = /user/flume&lt;BR /&gt;tail1.sinks.hdfs-sink.hdfs.filePrefix = log&lt;BR /&gt;tail1.sinks.hdfs-sink.hdfs.rollInterval = 0&lt;BR /&gt;tail1.sinks.hdfs-sink.hdfs.rollCount = 10000&lt;BR /&gt;tail1.sinks.hdfs-sink.hdfs.fileType = DataStream&lt;/P&gt;&lt;P&gt;# Use a channel which buffers events in file&lt;BR /&gt;tail1.channels.mem-channel.type = memory&lt;BR /&gt;tail1.channels.mem-channel.capacity = 1000&lt;BR /&gt;tail1.channels.mem-channel.transactionCapacity = 100&lt;/P&gt;&lt;P&gt;# Bind the source and sink to the channel&lt;BR /&gt;tail1.sources.seq-source.channels = mem-channel&lt;BR /&gt;tail1.sinks.hdfs-sink.channel = mem-channel&lt;/P&gt;&lt;P&gt;Trying to run the flume agent as&lt;/P&gt;&lt;P&gt;flume-ng agent --conf /var/lib/flume-ng/plugins.d/MyFlumeSource/lib/MyFlumeSource.jar --conf-file /etc/flume-ng/conf/flume-conf.properties --name tail1&lt;/P&gt;&lt;P&gt;flume-ng agent --conf-file /etc/flume-ng/conf/flume-conf.properties --name tail1&lt;/P&gt;&lt;P&gt;In both cases I am getting the following error :&lt;/P&gt;&lt;P&gt;ERROR node.PollingPropertiesFileConfigurationProvider: Failed to load configuration data. Exception follows.&lt;BR /&gt;org.apache.flume.FlumeException: Unable to create source: seq-source, type: org.custom.flume.source.MySource, class: org.custom.flume.source.MySource&lt;BR /&gt;at org.apache.flume.source.DefaultSourceFactory.create(DefaultSourceFactory.java:48)&lt;BR /&gt;at org.apache.flume.node.AbstractConfigurationProvider.loadSources(AbstractConfigurationProvider.java:322)&lt;BR /&gt;at org.apache.flume.node.AbstractConfigurationProvider.getConfiguration(AbstractConfigurationProvider.java:97)&lt;BR /&gt;at org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:140)&lt;BR /&gt;at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)&lt;BR /&gt;at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)&lt;BR /&gt;at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)&lt;BR /&gt;at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)&lt;BR /&gt;at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)&lt;BR /&gt;at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)&lt;BR /&gt;at java.lang.Thread.run(Thread.java:745)&lt;BR /&gt;Caused by: java.lang.InstantiationException&lt;BR /&gt;at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:48)&lt;BR /&gt;at java.lang.reflect.Constructor.newInstance(Constructor.java:526)&lt;BR /&gt;at java.lang.Class.newInstance(Class.java:379)&lt;BR /&gt;at org.apache.flume.source.DefaultSourceFactory.create(DefaultSourceFactory.java:44)&lt;BR /&gt;... 10 more&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If any one aware of it please help me.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:26:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-in-Configuring-Custom-Flume-Source/m-p/26294#M5528</guid>
      <dc:creator>Losetty</dc:creator>
      <dc:date>2022-09-16T09:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: Error in Configuring Custom Flume Source</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-in-Configuring-Custom-Flume-Source/m-p/26726#M5529</link>
      <description>It appears as though there is some problems in your custom source instantiating the class. You can verify that the jar file is being loaded by running this:&lt;BR /&gt;lsof -u flume |grep MyFlumeSource.jar&lt;BR /&gt;&lt;BR /&gt;If it is then you need to review your code to determine what is causing that exception, here are a few pointers: &lt;A target="_blank" href="http://craftingjava.blogspot.com/2012/06/javalanginstantiationexception.html"&gt;http://craftingjava.blogspot.com/2012/06/javalanginstantiationexception.html&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 23 Apr 2015 16:28:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-in-Configuring-Custom-Flume-Source/m-p/26726#M5529</guid>
      <dc:creator>pdvorak</dc:creator>
      <dc:date>2015-04-23T16:28:40Z</dc:date>
    </item>
  </channel>
</rss>

