Package google.registry.batch
Class ExpandRecurringBillingEventsAction
- java.lang.Object
-
- google.registry.batch.ExpandRecurringBillingEventsAction
-
- All Implemented Interfaces:
java.lang.Runnable
public class ExpandRecurringBillingEventsAction extends java.lang.Object implements java.lang.Runnable
A mapreduce that expandsBillingEvent.Recurring
billing events into syntheticBillingEvent.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).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExpandRecurringBillingEventsAction.ExpandRecurringBillingEventsMapper
Mapper to expandBillingEvent.Recurring
billing events into syntheticBillingEvent.OneTime
events.static class
ExpandRecurringBillingEventsAction.ExpandRecurringBillingEventsReducer
"Reducer" to advance the cursor after all map jobs have been completed.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PARAM_CURSOR_TIME
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 ofDateTime
s down to event times that are in scope for a particular mapreduce run, given the cursor time and the mapreduce execution time.void
run()
-
-
-
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 interfacejava.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 ofDateTime
s down to event times that are in scope for a particular mapreduce run, given the cursor time and the mapreduce execution time.
-
-