Example #1
0
 def __init__(self, gap_size):
   if gap_size <= 0:
     raise ValueError('The size parameter must be strictly positive.')
   self.gap_size = Duration.of(gap_size)
Example #2
0
 def __init__(self, size, period, offset=0):
   if size <= 0:
     raise ValueError('The size parameter must be strictly positive.')
   self.size = Duration.of(size)
   self.period = Duration.of(period)
   self.offset = Timestamp.of(offset) % size
Example #3
0
 def __init__(self, gap_size):
     if gap_size <= 0:
         raise ValueError('The size parameter must be strictly positive.')
     self.gap_size = Duration.of(gap_size)
Example #4
0
 def __init__(self, size, period, offset=0):
     if size <= 0:
         raise ValueError('The size parameter must be strictly positive.')
     self.size = Duration.of(size)
     self.period = Duration.of(period)
     self.offset = Timestamp.of(offset) % size
Example #5
0
 def from_runner_api_parameter(fn_parameter, unused_context):
     return Sessions(gap_size=Duration(micros=fn_parameter['gap_size']))
Example #6
0
 def from_runner_api_parameter(fn_parameter, unused_context):
     return SlidingWindows(size=Duration(micros=fn_parameter['size']),
                           offset=Timestamp(micros=fn_parameter['offset']),
                           period=Duration(micros=fn_parameter['period']))