Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Flume includePattern regular expressions

Expert Contributor

 

I don't understand how includePattern works in Flume. It should accept a regular expression, but the only one that is working to me is the following:

 

 

# accepts only .zip files

agent.sources.src1.includePattern=^.*\.zip$

 

But if for example I want to match only files with format WWWW.DDDDD.zip (e.g. abc.123.zip) the followings does not work:

 

agent.sources.src1.includePattern=^[^\.]+\.[^\.]+\.zip$

agent.sources.src1.includePattern=^\w+\.\d+\.zip$

 

Does anyone know how regex expressions work in Flume?

 

 

2 REPLIES 2

Super Collaborator
What version of CDH are you running? CDH 5.11.0 and above include FLUME-2911 which does allow for regex patterns.



-pd

Expert Contributor

cdh 5.13.2, but commons regex patterns don't seem to work

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.