title: saveAsTextFile to s3 on spark does not work, just hangs
body: <p>I am loading a csv text file from s3 into spark, filtering and mapping the records and writing the result to s3.</p>
  
  <p>I have tried several input sizes: 100k rows, 1M rows &amp; 3.5M rows.
  The former two finish successfully while the latter (3.5M rows) hangs in some weird state in which the job stages monitor web app (the one in port 4040) stops , and the command line console gets stuck and does not even respond to ctrl-c. The Master's web monitoring app still responds and shows the state as <code>FINISHED</code>.</p>
  
  <p>In s3, I see an empty directory with a single zero-sized entry <code>_temporary_$folder$</code>. The s3 url is given using the <code>s3n://</code> protocol.</p>
  
  <p>I did not see any error in the logs in the web console.
  I also tried several cluster sizes (1 master + 1 worker, 1 master + 5 workers) and got to the same state.</p>
  
  <p>Has anyone encountered such an issue?
  Any idea what's going on?</p>