spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samarth Mailinglist <mailinglistsama...@gmail.com>
Subject Re: Read a HDFS file from Spark source code
Date Wed, 12 Nov 2014 05:56:04 GMT
Instead of a file path, use a HDFS URI.
For example: (In Python)



data = sc.textFile("hdfs://localhost/user/someuser/data")

‚Äč

On Wed, Nov 12, 2014 at 10:12 AM, rapelly kartheek <kartheek.mbms@gmail.com>
wrote:

> Hi
>
> I am trying to access a file in HDFS from spark "source code". Basically,
> I am tweaking the spark source code. I need to access a file in HDFS from
> the source code of the spark. I am really not understanding how to go about
> doing this.
>
> Can someone please help me out in this regard.
> Thank you!!
> Karthik
>

Mime
View raw message