> On 六月 19, 2017, 7:42 a.m., András Piros wrote:
> > core/src/main/java/org/apache/oozie/command/coord/CoordSubmitXCommand.java
> > Lines 870-871 (patched)
> > <https://reviews.apache.org/r/59906/diff/2/?file=1753124#file1753124line870>
> >
> >     You should at least `LOG.warn()`, but are you sure we shouldn't handle 
> > like that:
> >     ```
> >     throw new CommandException(ErrorCode.E1004, "Validation ERROR :" + 
> > e.getMessage(), e);
> >     ```
> >     
> >     Apart from that, instead of catching an `Exception`, please list all 
> > specific `Exception` types that can possibly occcur here. Code will be 
> > safer and much more readable.

As you can see: 
In **org.apache.oozie.coord.CoordELFunctions**
``java public static String ***evalAndWrap***(ELEvaluator eval, String expr) 
throws Exception``

So I use ``catch (Exception e)``, there is no ohter types;


I don't think add ``LOG.warn()`` is avaliable, user may be confused if there 
are lots of warn logs which will not affect user's coordinator;
As I said before:

coordinator.xml define SLA like this

<sla:info>
  <sla:nominal-time>${nominal_time}</sla:nominal-time>
  <sla:should-end>${ 1 * HOURS}</sla:should-end>
  <sla:notification-msg>Notifying User for ${coord:nominalTime()} 
${coord:actualTime()} </sla:notification-msg>
</sla:info>


**should-end** and **notification-msg** are not variables defined in 
configuration, user may be confused if we log it in warn;
But we can log it in debug or trace I think;


- Wen


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


On 六月 19, 2017, 7:11 a.m., Wen Chi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59906/
> -----------------------------------------------------------
> 
> (Updated 六月 19, 2017, 7:11 a.m.)
> 
> 
> Review request for oozie and András Piros.
> 
> 
> Bugs: OOZIE-2929
>     https://issues.apache.org/jira/browse/OOZIE-2929
> 
> 
> Repository: oozie-git
> 
> 
> Description
> -------
> 
> 1. coordinator.xml define SLA like this
> ```xml
> <sla:info>
>   <sla:nominal-time>${nominal_time}</sla:nominal-time>
>   <sla:should-end>${ 1 * HOURS}</sla:should-end>
>   <sla:max-duration>${1 * MINUTES}</sla:max-duration>
> </sla:info>
> ```
> 2. In job.properties define: **nominal_time=${coord:nominalTime()}**
> 3. Then coordinator will run failed
> > "Coord Job Materialization Error: Could not parse [${coord:nominalTime()}] 
> > using [yyyy-MM-dd'T'HH:mm+0800] mask";
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/oozie/command/coord/CoordSubmitXCommand.java 
> 17e7fa0a9af3c160f98ea615bc73f3a1d7489aec 
>   
> core/src/test/java/org/apache/oozie/command/coord/TestCoordMaterializeTransitionXCommand.java
>  2e39689d62fcad3eb5d58f81dbd743f3e0a6b46f 
> 
> 
> Diff: https://reviews.apache.org/r/59906/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Wen Chi
> 
>

Reply via email to