I am practicing some spark code, and starting itself I am stuck with below error.
newRDD = sc.textFile("/user/cloudera/sqoop-import/products")
17/03/15 20:41:31 INFO storage.MemoryStore: Block broadcast_1 stored as values in memory (estimated size 198.0 KB, free 419.3 KB) 17/03/15 20:41:31 INFO storage.MemoryStore: Block broadcast_1_piece0 stored as bytes in memory (estimated size 23.3 KB, free 442.7 KB) 17/03/15 20:41:31 INFO storage.BlockManagerInfo: Added broadcast_1_piece0 in memory on 192.168.50.129:49855 (size: 23.3 KB, free: 530.2 MB) 17/03/15 20:41:31 INFO spark.SparkContext: Created broadcast 1 from textFile at NativeMethodAccessorImpl.java:-2
for i in newRDD:
... print(i)
...
Traceback (most recent call last): File "", line 1, in TypeError: 'RDD' object is not iterable