Support Questions
Find answers, ask questions, and share your expertise
Announcements
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

Explorer

Hi Friends -

Having an issue with the tutorial on the line:

keys.collect().foreach(println)

Here is the error message:

4459-gfoh2.png

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,

Mike


8oy6a.png
6 REPLIES 6

The first command...

wget –no-check-certificate ‘https://docs.google.com/uc?export=download&id=0BzhlOywnOpq8OWFzQjJObUtlck0’ -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.

Explorer

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

"https://docs.google.com/uc?export=download&id=0BzhlOywnOpq8OWFzQjJObUtlck0’ -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
fl
id
ny
ny
ca
ca

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 http://hortonworks.com/hadoop-tutorial/interacting-with-data-on-hdp-using-scala-and-apache-spark/ 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.