org.apache.oozie.util
Class XLogStreamer
java.lang.Object
org.apache.oozie.util.XLogStreamer
public class XLogStreamer
- extends Object
XLogStreamer streams the given log file to logWriter after applying the given filter.
Nested Class Summary |
static class |
XLogStreamer.Filter
Filter that will construct the regular expression that will be used to filter the log statement. |
Field Summary |
static Pattern |
gzTimePattern
This pattern matches the end of a gzip filename to have a format like "-YYYY-MM-dd-HH.gz" with capturing groups for each part
of the date |
Method Summary |
void |
streamLog(Date startTime,
Date endTime)
Gets the files that are modified between startTime and endTime in the given logPath and streams the log after
applying the filters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
gzTimePattern
public static final Pattern gzTimePattern
- This pattern matches the end of a gzip filename to have a format like "-YYYY-MM-dd-HH.gz" with capturing groups for each part
of the date
XLogStreamer
public XLogStreamer(XLogStreamer.Filter logFilter,
Writer logWriter,
String logPath,
String logFile,
long logRotationSecs)
streamLog
public void streamLog(Date startTime,
Date endTime)
throws IOException
- Gets the files that are modified between startTime and endTime in the given logPath and streams the log after
applying the filters.
- Parameters:
startTime
- endTime
-
- Throws:
IOException
Copyright © 2013 Apache Software Foundation. All Rights Reserved.