1616
1717from __future__ import absolute_import
1818
19- from google .cloud .dataflow .utils .counters import Accumulator
2019from google .cloud .dataflow .utils .counters import Counter
2120
2221
@@ -29,13 +28,11 @@ def __init__(self, counter_factory, step_name, coder, output_index):
2928 self .mean_byte_counter = counter_factory .get_counter (
3029 '%s-out%d-MeanByteCount' % (step_name , output_index ), Counter .MEAN )
3130 self .coder = coder
32- self ._active_accumulators = []
3331
3432 def update_from (self , windowed_value , coder = None ):
3533 """Add one value to this counter."""
3634 self .element_counter .update (1 )
37- byte_size_accumulator = Accumulator (self .mean_byte_counter .name )
38- self ._active_accumulators .append (byte_size_accumulator )
35+ # TODO(silviuc): Implement estimated size sampling.
3936 # TODO(gildea):
4037 # Actually compute the encoded size of this value.
4138 # In spirit, something like this:
@@ -50,9 +47,8 @@ def update_collect(self):
5047 Now that the element has been processed, we ask our accumulator
5148 for the total and store the result in a counter.
5249 """
53- for pending in self ._active_accumulators :
54- self .mean_byte_counter .update (pending .total )
55- self ._active_accumulators = []
50+ # TODO(silviuc): Implement estimated size sampling.
51+ pass
5652
5753 def __str__ (self ):
5854 return '<%s [%s]>' % (self .__class__ .__name__ ,
0 commit comments