flume-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AD <straightfl...@gmail.com>
Subject regex not matching 0 properly
Date Tue, 04 Oct 2011 02:40:04 GMT
Hello,

 I noticed when trying to use regex to parse an integer from a file, a
number of 0 was populating the number 48 into the output on the flume
command line instead.  has anyone come across this before?  Example below:

bash-3.2# cat /tmp/integer
0

bash-3.2# cat parse.int
./flume node_nowatch -1 -s -n dump -c 'dump: tail("/tmp/integer") | {
regexAll("^(\\d+)","mynum") => console }; '

bash-3.2# ./parse.int 2>&1 | grep mynum

2011-10-03 22:37:49,526 [main] INFO agent.FlumeNode: System property
sun.java.command=com.cloudera.flume.agent.FlumeNode -1 -s -n dump -c dump:
tail("/tmp/integer") | { regexAll("^(\\d+)","mynum") => console };
2011-10-03 22:37:49,966 [main] INFO agent.FlumeNode: Loading spec from
command line: 'dump: tail("/tmp/integer") | { regexAll("^(\\d+)","mynum") =>
console }; '
lilmac.home [INFO Mon Oct 03 22:37:50 EDT 2011] { *mynum : 48* } {
tailSrcFile : integer } 0

Cheers,
AD

Mime
View raw message