title: writeStream of spark generates many small files
body: <p>I am using Spark Structured Streaming (2.3) to write parquet data to buckets in the cloud ( Google Cloud Storage). 
  I am using the following function : </p>
  
  <pre><code>def writeStreaming(data: DataFrame, format: String, options: Map[String, String], partitions: List[String]): DataStreamWriter[Row] = {
  var dataStreamWrite = data.writeStream .format(format).options(options).trigger(Trigger.ProcessingTime("120 seconds"))
  
  if (!partitions.isEmpty)
    dataStreamWrite = ddataStreamWrite.partitionBy(partitions: _*)
  
  dataStreamWrite
  </code></pre>
  
  <p>}</p>
  
  <p>Unfortunately, with this approach, I am getting many small files. </p>
  
  <p>I tried to use the trigger approach in order to avoid this, but this didn't work too. Do you have any idea about how to handle this, please ? 
  Thanks a lot </p>