title: How can one see what RDD is available to Spark?
body: <p>I just started to use Spark. I try to follow <a href="http://spark.apache.org/docs/latest/quick-start.html" rel="nofollow">this</a> tutorial (I use Python).</p>
  
  <p>As the first two sentences I see the following:</p>
  
  <blockquote>
    <p>Spark’s primary abstraction is a distributed collection of items
    called a Resilient Distributed Dataset (RDD). RDDs can be created from
    Hadoop InputFormats (such as HDFS files) or by transforming other
    RDDs. Let’s make a new RDD from the text of the README file in the
    Spark source directory</p>
  </blockquote>
  
  <p>As far as I understood it correctly, Spark has "access" to items that are distributed over different machines belonging to a cluster on which Spark is running. These items can be imagined as files (or at least as something that can be obtained from a file). In particular, by executing the following:</p>
  
  <pre><code>textFile = sc.textFile("test.txt")
  </code></pre>
  
  <p>we use "test.txt" file to create a new "item" and to add it to the set of items that are visible (accessible) by Spark.</p>
  
  <p>Did I get it right. If it is the case, how can I see all the "items" available to the Spark. In particular, how can I see that a newly created item is there.</p>
  
  <p><strong>ADDED</strong></p>
  
  <p>To one of the users it was not clear what I mean. So, I try to clarify. In the tutorial a "distributed collection of items" is mentioned. So, there are some "items". Can one see what items exists? Or at least how many items exist? Can I type something in the PySpark session to get a number of existing "items"?</p>
  
  <p>I also have a problem with the terminology. Is it a set of items that is called RDD or each element (item) in the set is called RDD (the sentence that I refer to is ambiguous in this respect). By executing <code>sc.textFile</code> we made a new RDD. So, we added an item to the set of items? Can we see the items in the set (or at least the number of items in the set).</p>
  
  <p><strong>ADDED 2</strong></p>
  
  <p>It looks like that it is still not clear what I mean. I do not understand what is not clear. Maybe those for whom my question is not clear could specify more details about what exactly is unclear.</p>
  
  <p>But anyway, I try more. </p>
  
  <blockquote>
    <p>Spark’s primary abstraction is a distributed collection of items
    called a Resilient Distributed Dataset (RDD).</p>
  </blockquote>
  
  <p>If there is a collection of items, there should be a way to get some information about this "collection of items". For example, it is natural to assume that a collection of items can be characterized by number of items in the collection. Can I get this number?</p>