Ejemplo n.º 1
0
 public void Flush(IEnumerable <WindowedBucket> buckets)
 {
     if (buckets.Any())
     {
         _serializer.WriteBucketHeader(_writer);
         _serializer.Write(buckets, _writer);
     }
 }
Ejemplo n.º 2
0
 public void Flush(IEnumerable <WindowedBucket> buckets)
 {
     if (buckets.Any())
     {
         foreach (var partition in buckets.Partition((a, b) => !_fileNamingStrategy.EqualNames(a, b)))
         {
             var fileName = _fileNamingStrategy.BaseName(partition.First()) + "." + _serializer.FileExtension;
             using (var w = CreateOrOpen(fileName, writer => _serializer.WriteBucketHeader(writer)))
                 _serializer.Write(partition, w);
         }
     }
 }