[
https://issues.apache.org/jira/browse/FLUME-3212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shubhangi Pardeshi updated FLUME-3212:
--------------------------------------
Description:
Flume agent fails with FlumeException if configuration file contains comments
after property value in same line (i.e. as follows)
{code:java}
<property> = <value> #comment
{code}
i.e. config parameter value pair followed by comment
This is because flume is not ignoring these comment.
{code:java}
Example.
[root@cnode2 flume]# grep -i comment flume.conf
a1.sources.r1.type = netcat # this is inline comment
{code}
Produce below error in log
{code:java}
org.apache.flume.FlumeException: Unable to load source type: netcat # this is
inline comment, class: netcat # this is inline comment
at
org.apache.flume.source.DefaultSourceFactory.getClass(DefaultSourceFactory.java:68)
at
org.apache.flume.source.DefaultSourceFactory.create(DefaultSourceFactory.java:42)
at
org.apache.flume.node.AbstractConfigurationProvider.loadSources(AbstractConfigurationProvider.java:323)
...
Caused by: java.lang.ClassNotFoundException: netcat # this is inline comment
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
...
{code}
Ideally flume should ignore comment while parsing configuration file and agent
should start successfully. Or config file parsing related error should be
thrown.
was:
**Flume agent fails with Exception if configuration file contains comments
after property value in same line (i.e. as follows)
{code:java}
<property> = <value> #comment
{code}
i.e. config parameter value pair followed by comment
This is because flume is not ignoring these comment.
{code:java}
Example.
[root@cnode2 flume]# grep -i comment flume.conf
a1.sources.r1.type = netcat # this is inline comment
{code}
Produce below error in log
{code:java}
org.apache.flume.FlumeException: Unable to load source type: netcat # this is
inline comment, class: netcat # this is inline comment
at
org.apache.flume.source.DefaultSourceFactory.getClass(DefaultSourceFactory.java:68)
at
org.apache.flume.source.DefaultSourceFactory.create(DefaultSourceFactory.java:42)
at
org.apache.flume.node.AbstractConfigurationProvider.loadSources(AbstractConfigurationProvider.java:323)
...
Caused by: java.lang.ClassNotFoundException: netcat # this is inline comment
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
...
{code}
**Ideally flume should ignore comment while parsing configuration file and
agent should start successfully. Or config file parsing related error should be
thrown.
> Flume does not ignore comment after property name value pair from config file
> -----------------------------------------------------------------------------
>
> Key: FLUME-3212
> URL: https://issues.apache.org/jira/browse/FLUME-3212
> Project: Flume
> Issue Type: Bug
> Affects Versions: 1.9.0
> Reporter: Shubhangi Pardeshi
> Priority: Major
>
> Flume agent fails with FlumeException if configuration file contains comments
> after property value in same line (i.e. as follows)
> {code:java}
> <property> = <value> #comment
> {code}
> i.e. config parameter value pair followed by comment
> This is because flume is not ignoring these comment.
> {code:java}
> Example.
> [root@cnode2 flume]# grep -i comment flume.conf
> a1.sources.r1.type = netcat # this is inline comment
> {code}
> Produce below error in log
> {code:java}
> org.apache.flume.FlumeException: Unable to load source type: netcat # this is
> inline comment, class: netcat # this is inline comment
> at
> org.apache.flume.source.DefaultSourceFactory.getClass(DefaultSourceFactory.java:68)
> at
> org.apache.flume.source.DefaultSourceFactory.create(DefaultSourceFactory.java:42)
> at
> org.apache.flume.node.AbstractConfigurationProvider.loadSources(AbstractConfigurationProvider.java:323)
> ...
> Caused by: java.lang.ClassNotFoundException: netcat # this is inline comment
> at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
> ...
> {code}
>
> Ideally flume should ignore comment while parsing configuration file and
> agent should start successfully. Or config file parsing related error should
> be thrown.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]