Reputation: 341
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'
Upvotes: 5
Views: 12616
Reputation: 16920
It is sc.textFile(...)
with a capital F
.
You can inspect the API of SparkContext here.
Upvotes: 14