What does the u stand for in the RDD's print? Thanks


#1

This is seen when I do practice in python, is the “u” ignorable? Thanks.

for w in words.collect(): print(w)
(u’Hello’, u’this is HadoopExam.com ‘)
(u’This’, u’is QuickTechie.com ‘)
(u’Apache’, u’Spark Training ‘)
(u’This’, u’is Spark Learning Session ‘)
(u’Spark’, u’is faster than MapReduce ')


#2

“u” here means that the strings are raw unicode strings. you can read up more on unicode strings here.

https://docs.python.org/2/howto/unicode.html


#3

Thank you. That was what I thought but really no need to put an extra character there, right?


#4

yes. You can refer this link further
https://docs.python.org/2/howto/unicode.html

thank you