chukwa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerrit Jansen van Vuuren (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CHUKWA-454) DirTailingAdaptor Add option to Filter files.
Date Fri, 12 Feb 2010 13:32:28 GMT

     [ https://issues.apache.org/jira/browse/CHUKWA-454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gerrit Jansen van Vuuren updated CHUKWA-454:
--------------------------------------------

    Attachment: CHUKWA-454.patch

This patch uses the commons Fileutils with the WildcardFileFilter to filter out files based
on an optional argument.

 for(Object f: FileUtils.listFiles(dir, fileFilter, FileFilterUtils.trueFileFilter())) {
         scanDirHierarchy((File)f);
        }

Unfortunately the commons.io package does not have generics in yet so I had to do Object then
cast to File.

And example of using it:

add DirTailingAdaptor test somedir  app*.log filetailer.CharFileTailingAdaptorUTF8 0




> DirTailingAdaptor Add option to Filter files.
> ---------------------------------------------
>
>                 Key: CHUKWA-454
>                 URL: https://issues.apache.org/jira/browse/CHUKWA-454
>             Project: Hadoop Chukwa
>          Issue Type: New Feature
>          Components: data collection
>    Affects Versions: 0.4.0
>            Reporter: Gerrit Jansen van Vuuren
>            Priority: Minor
>             Fix For: 0.4.0
>
>         Attachments: CHUKWA-454.patch
>
>
> I would like to be able to point the DirTailingAdaptor at a directory but only have it
tail files matching to a certain pattern. 
> So I've made a change that allows the adaptor to recieve an optional filter parameter
and use the org.apache.commons.io.filefilter.WildcardFileFilter class to filter out files.
> This allows you to for example point the adaptor at a tomcat log directory and not have
it tail catalina.out logs etc. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message