[
https://issues.apache.org/jira/browse/FLUME-1661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nitin Verma updated FLUME-1661:
-------------------------------
Attachment: FlumeProcessRunner.tar.gz
Attaching a code tar so that you can play around.
$ tar -ztvf FlumeProcessRunner.tar.gz
-rw-rw-r-- nitin/nitin 220 2012-11-03 18:44
src/main/java/edu/nitin/testcodes/Destructible.java
-rw-rw-r-- nitin/nitin 233 2012-11-03 18:45
src/main/java/edu/nitin/testcodes/DestrutableRunner.java
-rw-rw-r-- nitin/nitin 8272 2012-11-03 23:43
src/main/java/edu/nitin/testcodes/FlumeProcessExecutor.java
-rw-rw-r-- nitin/nitin 316 2012-11-03 19:14
src/main/java/edu/nitin/testcodes/InputStreamRunner.java
-rw-rw-r-- nitin/nitin 548 2012-11-03 14:36
src/main/java/edu/nitin/testcodes/ProcessExecutionException.java
-rw-rw-r-- nitin/nitin 717 2012-11-03 20:07
src/main/java/edu/nitin/testcodes/ProcessExecutor.java
-rw-rw-r-- nitin/nitin 331 2012-11-02 20:15
src/test/resources/log4j.properties
-rw-rw-r-- nitin/nitin 3804 2012-11-04 00:53
src/test/java/edu/nitin/testcodes/FlumeProcessExecutorTest.java
-rw-rw-r-- nitin/nitin 1099 2012-11-02 20:05 pom.xml
> ExecSource cannot execute (little complicated..) *nix commands
> --------------------------------------------------------------
>
> Key: FLUME-1661
> URL: https://issues.apache.org/jira/browse/FLUME-1661
> Project: Flume
> Issue Type: Improvement
> Components: Sinks+Sources
> Affects Versions: v1.2.0
> Reporter: Yoonseok Woo
> Assignee: Roshan Naik
> Fix For: v1.3.0
>
> Attachments: FLUME-1661-1.patch, FLUME-1661.patch,
> FLUME-1661.patch.v2, FLUME-1661.patch.v3, FlumeProcessRunner.tar.gz
>
>
> * command line parsing
> ** conf/flume.conf
> {code}
> agent.sources.source1.type = exec
> agent.sources.source1.command = tail -f
> /some/path/logs/exception/error.log.`date +%Y%m%d%H`
> {code}
> ** result
> {code}
> tail: /some/path/logs/exception/error.log.`date: No such file or directory
> tail: +%Y%m%d%H`: No such file or directory
> {code}
> ** needs to be improved
> {code}
> (ExecSouce.java:242) String[] commandArgs = command.split("\\s+")
> {code}
> * using special character (e.g. *, `, ', ...)
> ** conf/flume.conf
> {code}
> agent.sources.source1.type = exec
> agent.sources.source1.command = tail -f /some/path/logs/exception/error.log.*
> {code}
> ** result
> {code}
> tail: /some/path/logs/exception/error.log.*: No such file or directory
> {code}
> ** needs to be improved
> {code}
> (ExecSouce.java:243) process = new ProcessBuilder(commandArgs).start();
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira