I have a text file name mr.txt in the hadoop file sytem under /project1 directory. I need to write the python code to read the first line of the text file without downloading mr.txt file into local. But I have trouble to open the mr.txt file from hdfs. I had tried:
open('hdfs:///project1/mr.txt','r')