You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by Wen Chi <ch...@me.com> on 2017/06/08 04:01:20 UTC
Review Request 59906: Coordinator SLA should support to configure EL
functions as variable
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59906/
-----------------------------------------------------------
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 969336d2
core/src/test/java/org/apache/oozie/command/coord/TestCoordSubmitXCommand.java dcc97ad0
Diff: https://reviews.apache.org/r/59906/diff/1/
Testing
-------
Thanks,
Wen Chi
Re: Review Request 59906: Coordinator SLA should support to configure
EL functions as variable
Posted by Wen Chi <ch...@me.com>.
> On 六月 12, 2017, 7:44 a.m., András Piros wrote:
> >
This is my first time to use ReviewBoard;
I not sure how to update a diff correctly:
```
fatal: git cat-file: could not get object info
Line undefined: undefined
```
so just add diff file ...
> On 六月 12, 2017, 7:44 a.m., András Piros wrote:
> > core/src/main/java/org/apache/oozie/command/coord/CoordSubmitXCommand.java
> > Lines 869-872 (patched)
> > <https://reviews.apache.org/r/59906/diff/1/?file=1744467#file1744467line869>
> >
> > This is quite suspicious here, to catch any and all `Exception` instances... can you be please much more specific?
I don't think this is a problem;
**CoordELFunctions.evalAndWrap**(evalNofuncs, tagElem.getText().trim()) throws Exception when content have el functions;
Use **evalNofuncs** for *resolveSLAContent* just resolve the variables in conf, don't need to resolve el fuctions;
example:
> 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:notification-msg>Notifying User for ${coord:nominalTime()} ${coord:actualTime()} </sla:notification-msg>
</sla:info>
```
el function like ${coord:nominalTime()} which defined in <sla:notification-msg> will not be resolved in function resolveSLAContent, so we need to cath Exception;
- Wen
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59906/#review177591
-----------------------------------------------------------
On 六月 8, 2017, 4:01 a.m., Wen Chi wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59906/
> -----------------------------------------------------------
>
> (Updated 六月 8, 2017, 4:01 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 969336d2
> core/src/test/java/org/apache/oozie/command/coord/TestCoordSubmitXCommand.java dcc97ad0
>
>
> Diff: https://reviews.apache.org/r/59906/diff/1/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Wen Chi
>
>
Re: Review Request 59906: Coordinator SLA should support to configure
EL functions as variable
Posted by András Piros <an...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59906/#review177591
-----------------------------------------------------------
core/src/main/java/org/apache/oozie/command/coord/CoordSubmitXCommand.java
Lines 863 (patched)
<https://reviews.apache.org/r/59906/#comment251280>
You can move that within the `try` block to minimize variable scope.
core/src/main/java/org/apache/oozie/command/coord/CoordSubmitXCommand.java
Lines 869-872 (patched)
<https://reviews.apache.org/r/59906/#comment251279>
This is quite suspicious here, to catch any and all `Exception` instances... can you be please much more specific?
core/src/test/java/org/apache/oozie/command/coord/TestCoordSubmitXCommand.java
Lines 741 (patched)
<https://reviews.apache.org/r/59906/#comment251281>
It would be nicer to have a separate test case just for testing the new behavior.
- András Piros
On June 8, 2017, 4:01 a.m., Wen Chi wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59906/
> -----------------------------------------------------------
>
> (Updated June 8, 2017, 4:01 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 969336d2
> core/src/test/java/org/apache/oozie/command/coord/TestCoordSubmitXCommand.java dcc97ad0
>
>
> Diff: https://reviews.apache.org/r/59906/diff/1/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Wen Chi
>
>
Re: Review Request 59906: Coordinator SLA should support to configure
EL functions as variable
Posted by András Piros <an...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59906/#review178268
-----------------------------------------------------------
core/src/main/java/org/apache/oozie/command/coord/CoordSubmitXCommand.java
Line 870 (original), 870 (patched)
<https://reviews.apache.org/r/59906/#comment252150>
`LOG.warn("Variable is not defined in job.properties. Here is the message: {0}", e.getMessage());`
- András Piros
On June 19, 2017, 11:09 a.m., Wen Chi wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59906/
> -----------------------------------------------------------
>
> (Updated June 19, 2017, 11:09 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/3/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Wen Chi
>
>
Re: Review Request 59906: Coordinator SLA should support to configure
EL functions as variable
Posted by Wen Chi <ch...@me.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59906/
-----------------------------------------------------------
(Updated 六月 20, 2017, 9:33 a.m.)
Review request for oozie and András Piros.
Changes
-------
Is it avaliable to change SLA Monitoring document like this;
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 (updated)
-----
core/src/main/java/org/apache/oozie/command/coord/CoordSubmitXCommand.java 17e7fa0a9af3c160f98ea615bc73f3a1d7489aec
core/src/test/java/org/apache/oozie/command/coord/TestCoordMaterializeTransitionXCommand.java 2e39689d62fcad3eb5d58f81dbd743f3e0a6b46f
docs/src/site/twiki/DG_SLAMonitoring.twiki 8107788fdaf3b518ef2b7baeec5381e733923908
Diff: https://reviews.apache.org/r/59906/diff/6/
Changes: https://reviews.apache.org/r/59906/diff/5-6/
Testing
-------
Thanks,
Wen Chi
Re: Review Request 59906: Coordinator SLA should support to configure
EL functions as variable
Posted by Wen Chi <ch...@me.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59906/
-----------------------------------------------------------
(Updated 六月 20, 2017, 9: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 (updated)
-----
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/5/
Changes: https://reviews.apache.org/r/59906/diff/4-5/
Testing
-------
Thanks,
Wen Chi
Re: Review Request 59906: Coordinator SLA should support to configure
EL functions as variable
Posted by András Piros <an...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59906/#review178358
-----------------------------------------------------------
Ship it!
Ship It!
- András Piros
On June 20, 2017, 2:53 a.m., Wen Chi wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59906/
> -----------------------------------------------------------
>
> (Updated June 20, 2017, 2:53 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/4/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Wen Chi
>
>
Re: Review Request 59906: Coordinator SLA should support to configure
EL functions as variable
Posted by Wen Chi <ch...@me.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59906/#review178359
-----------------------------------------------------------
Ship it!
Ship It!
- Wen Chi
On 六月 20, 2017, 2:53 a.m., Wen Chi wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59906/
> -----------------------------------------------------------
>
> (Updated 六月 20, 2017, 2:53 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/4/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Wen Chi
>
>
Re: Review Request 59906: Coordinator SLA should support to configure
EL functions as variable
Posted by Peter Cseh <ge...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59906/#review178360
-----------------------------------------------------------
core/src/main/java/org/apache/oozie/command/coord/CoordSubmitXCommand.java
Lines 865-866 (patched)
<https://reviews.apache.org/r/59906/#comment252268>
This can be in one line
- Peter Cseh
On June 20, 2017, 2:53 a.m., Wen Chi wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59906/
> -----------------------------------------------------------
>
> (Updated June 20, 2017, 2:53 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/4/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Wen Chi
>
>
Re: Review Request 59906: Coordinator SLA should support to configure
EL functions as variable
Posted by Wen Chi <ch...@me.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59906/
-----------------------------------------------------------
(Updated 六月 20, 2017, 2:53 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 (updated)
-----
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/4/
Changes: https://reviews.apache.org/r/59906/diff/3-4/
Testing
-------
Thanks,
Wen Chi
Re: Review Request 59906: Coordinator SLA should support to configure
EL functions as variable
Posted by Wen Chi <ch...@me.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59906/
-----------------------------------------------------------
(Updated 六月 19, 2017, 11:09 a.m.)
Review request for oozie and András Piros.
Changes
-------
add ``LOG.warn()`` for sla content is not defined as variable in job.properties;
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 (updated)
-----
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/3/
Changes: https://reviews.apache.org/r/59906/diff/2-3/
Testing
-------
Thanks,
Wen Chi
Re: Review Request 59906: Coordinator SLA should support to configure
EL functions as variable
Posted by Wen Chi <ch...@me.com>.
> 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
>
>
Re: Review Request 59906: Coordinator SLA should support to configure
EL functions as variable
Posted by András Piros <an...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59906/#review178199
-----------------------------------------------------------
core/src/main/java/org/apache/oozie/command/coord/CoordSubmitXCommand.java
Lines 870-871 (patched)
<https://reviews.apache.org/r/59906/#comment252070>
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.
- András Piros
On June 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 June 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
>
>
Re: Review Request 59906: Coordinator SLA should support to configure
EL functions as variable
Posted by Wen Chi <ch...@me.com>.
-----------------------------------------------------------
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.
Changes
-------
Update new diff;
Add new testcase for resolveSLAContent;
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 (updated)
-----
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/
Changes: https://reviews.apache.org/r/59906/diff/1-2/
Testing
-------
Thanks,
Wen Chi