title: Writing Spark Dataset with Custom Unix Group
body: <p>In apache spark, I'm having a dataset which I'm writing to disk:</p>
  <pre><code>var ds = Seq(1, 2, 3).toDS();
  
  ds.write.parquet(&quot;/tmp/01/01&quot;);
  </code></pre>
  <p>As expected, this writes records on disk in parquet format:</p>
  <pre><code>vaxaci$ ls -ltr /tmp/01/01/
  total 24
  drwxr-----  1 vaxaci  hadoop  430 Oct 19 14:12 part-00000-ba320358-7ee3-46dc-b90f-3b9c94fa6503-c000.snappy.parquet
  drwxr-----  1 vaxaci  hadoop  430 Oct 19 14:12 part-00001-ba320358-7ee3-46dc-b90f-3b9c94fa6503-c000.snappy.parquet
  drwxr-----  1 vaxaci  hadoop  430 Oct 19 14:12 part-00002-ba320358-7ee3-46dc-b90f-3b9c94fa6503-c000.snappy.parquet
  drwxr-----  1 vaxaci  hadoop    0 Oct 19 14:12 _SUCCESS
  </code></pre>
  <p>But the problem is with the UNIX group with which it's writing. Currently it is writing with group name <code>hadoop</code>.</p>
  <p>Is there any way through which I can programatically (in <code>java</code> preferably) modify this group to something else, say <code>friends</code>?</p>