> On Feb. 25, 2016, 3 p.m., Robert Kanter wrote:
> > I need to spend more time (hopefully sometime next week) looking through 
> > the more complicated logic changes with LogLine in more detail, but here's 
> > some trivial stuff I found during a first pass.

Thank you Robert for comments. I will make changes accordingly.


> On Feb. 25, 2016, 3 p.m., Robert Kanter wrote:
> > core/src/main/java/org/apache/oozie/util/SimpleTimestampedMessageParser.java,
> >  line 42
> > <https://reviews.apache.org/r/43970/diff/2/?file=1268508#file1268508line42>
> >
> >     Is this method used anymore?

It is used in ZKXLogStreamingService. In collectLogs() method, 

SimpleTimestampedMessageParser is created as -

parsers.add(new SimpleTimestampedMessageParser(reader, filter));

and later, parser is used for processing logs. 

if (parsers.size() == 1) {
   TimestampedMessageParser parser = parsers.get(0);
   parser.processRemaining(writer, bufferLen);
}

parser.processRemaining ends up calling 
SimpleTimestampedMessageParser.parseNextLine() method.


> On Feb. 25, 2016, 3 p.m., Robert Kanter wrote:
> > core/src/main/java/org/apache/oozie/util/XLogFilter.java, line 65
> > <https://reviews.apache.org/r/43970/diff/2/?file=1268510#file1268510line65>
> >
> >     Let's make this package private instead of public.

I am using it in constructor - TimestampedMessageParser(BufferedReader reader, 
XLogFilter filter) 

String regEx = XLogFilter.PREFIX_REGEX + filter.getFilterPattern().pattern();
        this.splitPattern = Pattern.compile(regEx);

to avoid calulation of PREFIX_REGEX again.


- Satish


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43970/#review120792
-----------------------------------------------------------


On Feb. 24, 2016, 3:31 p.m., Satish Saley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43970/
> -----------------------------------------------------------
> 
> (Updated Feb. 24, 2016, 3:31 p.m.)
> 
> 
> Review request for oozie.
> 
> 
> Bugs: https://issues.apache.org/jira/browse/OOZIE-2417
>     
> https://issues.apache.org/jira/browse/https://issues.apache.org/jira/browse/OOZIE-2417
> 
> 
> Repository: oozie-git
> 
> 
> Description
> -------
> 
> This patch tries to minimize the parsing of same log line for multiple times 
> using different regex.
> It also caches the log parts once we figure out what those are, thus avoiding 
> the re-parsing of log line to get log parts whenever needed.
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/oozie/util/LogLine.java PRE-CREATION 
>   
> core/src/main/java/org/apache/oozie/util/SimpleTimestampedMessageParser.java 
> 78cb042 
>   core/src/main/java/org/apache/oozie/util/TimestampedMessageParser.java 
> f691409 
>   core/src/main/java/org/apache/oozie/util/XLogFilter.java 3b49f77 
> 
> Diff: https://reviews.apache.org/r/43970/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Satish Saley
> 
>

Reply via email to