'SparkContext' object has no attribute 'textfile'

Viewed 11064

I tried loading a file by using following code:

textdata = sc.textfile('hdfs://localhost:9000/file.txt')

Error message:

AttributeError: 'SparkContext' object has no attribute 'textfile'

1 Answers
Related