<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Getting Error while executing this command in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-Error-while-executing-this-command/m-p/98751#M12117</link>
    <description>&lt;PRE&gt;rdd = sc.parallelize(r1)
Traceback (most recent call last):
  File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;
  c = list(c)  # Make it a list so we can compute its length
TypeError: 'PipelinedRDD' object is not iterable&lt;/PRE&gt;&lt;P&gt;~~~~~~~~~~~~~~~~~My commands are ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;PRE&gt;&amp;gt;&amp;gt;&amp;gt; R = sc.textFile(filename);
&amp;gt;&amp;gt;&amp;gt; R.collect()
&amp;gt;&amp;gt;&amp;gt; r1 = R.map(lambda s: s.split(","))
&amp;gt;&amp;gt;&amp;gt; r1.collect()
&amp;gt;&amp;gt;&amp;gt; rdd = sc.parallelize(r1)&lt;/PRE&gt;</description>
    <pubDate>Fri, 11 Dec 2015 19:12:07 GMT</pubDate>
    <dc:creator>lakumivnarayana</dc:creator>
    <dc:date>2015-12-11T19:12:07Z</dc:date>
    <item>
      <title>Getting Error while executing this command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-Error-while-executing-this-command/m-p/98751#M12117</link>
      <description>&lt;PRE&gt;rdd = sc.parallelize(r1)
Traceback (most recent call last):
  File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;
  c = list(c)  # Make it a list so we can compute its length
TypeError: 'PipelinedRDD' object is not iterable&lt;/PRE&gt;&lt;P&gt;~~~~~~~~~~~~~~~~~My commands are ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;/P&gt;&lt;PRE&gt;&amp;gt;&amp;gt;&amp;gt; R = sc.textFile(filename);
&amp;gt;&amp;gt;&amp;gt; R.collect()
&amp;gt;&amp;gt;&amp;gt; r1 = R.map(lambda s: s.split(","))
&amp;gt;&amp;gt;&amp;gt; r1.collect()
&amp;gt;&amp;gt;&amp;gt; rdd = sc.parallelize(r1)&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Dec 2015 19:12:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-Error-while-executing-this-command/m-p/98751#M12117</guid>
      <dc:creator>lakumivnarayana</dc:creator>
      <dc:date>2015-12-11T19:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Error while executing this command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-Error-while-executing-this-command/m-p/98752#M12118</link>
      <description>&lt;P&gt;R is an RDD. So r1 is also an RDD. &lt;/P&gt;&lt;P&gt;So you are trying to call "parallelize()" on an RDD, where you should not do that. Usually, use parallelize() on a local python object, like a list. &lt;/P&gt;</description>
      <pubDate>Sat, 12 Dec 2015 05:55:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-Error-while-executing-this-command/m-p/98752#M12118</guid>
      <dc:creator>ofermend</dc:creator>
      <dc:date>2015-12-12T05:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Error while executing this command</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-Error-while-executing-this-command/m-p/98753#M12119</link>
      <description>&lt;P&gt;Additionally, if you want to change number of partitions (and then parallelism) of an existing RDD, you can use&lt;/P&gt;&lt;PRE&gt;rdd.repartition(8)&lt;/PRE&gt;&lt;P&gt;See the comments and tests from here:
&lt;A target="_blank" href="https://community.hortonworks.com/questions/5825/best-way-to-select-distinct-values-from-multiple-c.html"&gt;https://community.hortonworks.com/questions/5825/best-way-to-select-distinct-values-from-multiple-c.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Dec 2015 06:36:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-Error-while-executing-this-command/m-p/98753#M12119</guid>
      <dc:creator>gbraccialli3</dc:creator>
      <dc:date>2015-12-12T06:36:23Z</dc:date>
    </item>
  </channel>
</rss>

