Class ExpandRecurringBillingEventsAction

  • All Implemented Interfaces:
    java.lang.Runnable

    public class ExpandRecurringBillingEventsAction
    extends java.lang.Object
    implements java.lang.Runnable
    A mapreduce that expands BillingEvent.Recurring billing events into synthetic BillingEvent.OneTime events.

    The cursor used throughout this mapreduce (overridden if necessary using the parameter cursorTime) represents the inclusive lower bound on the range of billing times that will be expanded as a result of the job (the exclusive upper bound being the execution time of the job).

    • Field Detail

      • PARAM_CURSOR_TIME

        public static final java.lang.String PARAM_CURSOR_TIME
        See Also:
        Constant Field Values
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • getBillingTimesInScope

        protected static com.google.common.collect.ImmutableSet<org.joda.time.DateTime> getBillingTimesInScope​(java.lang.Iterable<org.joda.time.DateTime> eventTimes,
                                                                                                               org.joda.time.DateTime cursorTime,
                                                                                                               org.joda.time.DateTime executeTime,
                                                                                                               Registry tld)
        Filters a set of DateTimes down to event times that are in scope for a particular mapreduce run, given the cursor time and the mapreduce execution time.