> On April 10, 2014, 1:50 a.m., Purshotam Shah wrote:
> > core/src/main/java/org/apache/oozie/coord/CoordELFunctions.java, line 1363
> > <https://reviews.apache.org/r/18762/diff/4/?file=552672#file552672line1363>
> >
> > Why are u diving and multiplying and why if(instanceCount[0] > 2)
case MINUTE:
instanceCount[0] = (int) ((effectiveTime.getTime() -
datasetInitialInstance.getTime()) / MINUTE_MSEC);
If the frequency is 5 minutely, this just computes the difference in minutes.
So, the actual instance count is (instanceCount[0]/freq). For calendar
addition, we again need to multiply by freq as the addition is at minute level.
Makes sense?
- shwethags
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18762/#review39973
-----------------------------------------------------------
On April 21, 2014, 7:02 a.m., shwethags wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18762/
> -----------------------------------------------------------
>
> (Updated April 21, 2014, 7:02 a.m.)
>
>
> Review request for oozie.
>
>
> Bugs: OOZIE-1709
> https://issues.apache.org/jira/browse/OOZIE-1709
>
>
> Repository: oozie-git
>
>
> Description
> -------
>
> CoordELFunctions.getCurrentInstance() has this code:
> while (current.compareTo(calEffectiveTime) <= 0) {
> current = (Calendar) origCurrent.clone();
> instanceCount[0]++;
> current.add(dsTimeUnit.getCalendarUnit(), instanceCount[0] *
> dsFreq);
> }
>
> For coords with smaller frequency and start time in very past, this is very
> expensive. On prod, we have seen materialisation of each instance taking few
> mins sometimes for coords with 1 min frequency
>
>
> Diffs
> -----
>
> core/src/main/java/org/apache/oozie/coord/CoordELFunctions.java d73bc7d
> core/src/test/java/org/apache/oozie/coord/TestCoordELFunctions.java be35ce4
>
> Diff: https://reviews.apache.org/r/18762/diff/
>
>
> Testing
> -------
>
> UT
>
>
> Thanks,
>
> shwethags
>
>