Shubhangi Pardeshi created FLUME-3212:
-----------------------------------------

             Summary: 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


**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.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to