title: Why are my `binaryFiles` empty when I collect them in pyspark?
body: <p>I have two zip files on hdfs in the same folder : <code>/user/path-to-folder-with-zips/</code>.</p>
  
  <p>I pass that to "binaryfiles" in pyspark:</p>
  
  <pre><code>zips = sc.binaryFiles('/user/path-to-folder-with-zips/')
  </code></pre>
  
  <p>I'm trying to unzip the zip files and do things to the text files in them, so I tried to just see what the content will be when I try to deal with the RDD.  I did it like this:</p>
  
  <pre><code>zips_collected = zips.collect()
  </code></pre>
  
  <p>But, when I do that, it gives an empty list:</p>
  
  <pre><code>&gt;&gt; zips_collected
  []
  </code></pre>
  
  <p>I know that the zips are not empty - they have textfiles.  The documentation <a href="http://spark.apache.org/docs/latest/api/python/pyspark.html" rel="nofollow">here</a> says </p>
  
  <p><em>Each file is read as a single record and returned in a key-value pair, where the key is the path of each file, the value is the content of each file.</em></p>
  
  <p>What am I doing wrong here?  I know I can't view the contents of the file because it is zipped and therefore binary.  But, I should at least be able to see <em>SOMETHING</em>.  Why does it not return anything?</p>
  
  <p>There can be more than one file per zip file, but the contents are always something like this:</p>
  
  <pre><code>rownum|data|data|data|data|data
  rownum|data|data|data|data|data
  rownum|data|data|data|data|data
  </code></pre>