Support Questions
Find answers, ask questions, and share your expertise
Alert: Please see the Cloudera blog for information on the Cloudera Response to CVE-2021-4428

Error executing tutorial on "keys.collect().foreach(println)" line


Hi Friends -

Having an issue with the tutorial on the line:


Here is the error message:


Any thoughts as to what is going on here? This seems like a pretty simple command - but apparently something is amiss.

Many thanks for your thoughts,



The first command...

wget –no-check-certificate ‘’ -O /tmp/littlelog.csv

failed for me; both in Zeppelin and in my SSH session.

Were you able to get this loaded into /tmp in HDFS?

Thanks @Robert Hryniewicz for fixing the wget paragraph on the tutorial.


Hello Lester -

I was able to get this file - but not by using the line of the tutorial. I ended up copying and pasting the line

"’ -O /tmp/littlelog.csv" into my browser, downloading the file to my Downloads folder, and they uploading to HDFS via the Ambari Sandbox.

I was able to successfully process and get the expected results through the tutorial steps up to that point...

So the file is there - I can perform operations on it - cannot figure out want went wrong.

Any ideas?

And thank you so much for your assistance.

It is actually working fine for me (sans the cli wget issue) as shown here.

keys: org.apache.spark.rdd.RDD[String] = MapPartitionsRDD[6] at map at <console>:35

Issue a "reboot now" command in a SSH window while logged in as root to see if when all comes back up you are still seeing this problem. If so, try doing it via the spark-shell CLI version. You are right that this is a very basic command and SHOULD be working for you.

@Rafael Coss, can someone look at the wget command at the top of as @Mike Vogt and myself both had troubles getting it to work as indicated (we just pulled the file down with our browser). Also, maybe somebody can adjust the font so it is fixed-width and shows the line breaks. Thx!!

Kudos to @Robert Hryniewicz who updated the wget bits on the tutorial. That paragraph seems to be working fine now.