Added new config 'shell' for Exec source
Review Request #7748 - Created Oct. 26, 2012 and submitted
Added new optional config directive 'shell' for Exec Source. One can specify how to invoke a shell to run the command (e.g. /bin/sh -c) . This is only needed for commands that use features like wildcards, backticks, pipes, etc that are supported by the shell.
Have added a few test cases for both simple and more complex commands.
Posted (Oct. 26, 2012, 6:58 p.m.)
Would you mind improving user guide a bit more? I would appreciate some paragraphs about the differences when shell is/isn't included and what are use cases, etc...
Posted (Nov. 2, 2012, 10:02 a.m.)
Hey Roshan, we should add a pointer back to https://issues.apache.org/jira/browse/FLUME-1661 Also we need a more complex test case to ensure escaping of double-quotes and nested quotes works. Would be good to read those values from a properties file (we can check it into src/test/resources) so that the string decoding is the same as it would be with a Flume config file in normal use.
Posted (Jan. 28, 2013, 7:27 p.m.)
Sorry for being so tardy. Below is a few review items, oeverall I think the patch looks quite good!
nit: I understand the other member variables are not final, but since we are adding a new one, can we make this one final?
+1 for moving this to shared methods. However, I cannot think of any other tests except the HBase tests which use static stuff. I think it makes sense if the static stuff is heavy weight but these objects are light weight. Let's stick with Before and After here.
Let's add tests to test shell arithmetic and also the more modern $( ) proces substitution.
I like the term Required over Needed here. Also, typically the term backtick is used over back tick.
Posted (March 7, 2013, 8:45 p.m.)
Looks good! Thanks Roshan! I was running tests to commit this and I get a couple failures. Below. Do they pass for you? Tests in error: testShellCommandEmbeddingAndEscaping(org.apache.flume.source.TestExecSource): flume-ng-core/src/test/resources/test_command.txt (No such file or directory) testShellCommandEmbeddingAndEscaping(org.apache.flume.source.TestExecSource)
Review request changed
Updated (March 11, 2013, 10:54 p.m.)
- changed from pending to submitted