

def flush(self):
    'Flush pool contents.'
    start_time = time.time()
    for (filename, data) in self._append_buffer.iteritems():
        with files.open(filename, 'a') as f:
            if (len(data) > _FILES_API_MAX_SIZE):
                raise errors.Error(('Bad data of length: %s' % len(data)))
            if self._ctx:
                operation.counters.Increment(COUNTER_IO_WRITE_BYTES, len(data))(self._ctx)
            f.write(self)
    if self._ctx:
        operation.counters.Increment(COUNTER_IO_WRITE_MSEC, int(((time.time() - start_time) * 1000)))(self._ctx)
    self._append_buffer = {
        
    }
    self._size = 0

dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/mapreduce/output_writers.py _FilePool.flush/VarMisuse@110/151 `data`->`self`