Input file as an argument og a Spark code

2017-07-24 Thread Joaquín Silva
Hello,

 

I'm building a BASH program (using Curl)  that should run a Spark code remotely 
using Livy. But one of the code argument  is a CSV file, how can I make that 
spark reads this file?. The file is going to be in client side, not in the 
Spark cluster machines.

 

Regards,

 

Joaquín Silva

 



Re: Input file as an argument og a Spark code

2017-07-24 Thread Saisai Shao
I think you have to make this csv file accessible from Spark cluster,
putting to HDFS is one possible solution.

On Tue, Jul 25, 2017 at 1:26 AM, Joaquín Silva  wrote:

> Hello,
>
>
>
> I'm building a BASH program (using Curl)  that should run a Spark code
> remotely using Livy. But one of the code argument  is a CSV file, how can I
> make that spark reads this file?. The file is going to be in client side,
> not in the Spark cluster machines.
>
>
>
> Regards,
>
>
>
> Joaquín Silva
>
>
>


Re: Input file as an argument og a Spark code

2017-07-24 Thread Vivek Suvarna
I had a similar requirement. 
I used webhdfs to first copy the file across to hdfs before starting the spark 
job via Livy. 


Sent from my iPhone

> On 25 Jul 2017, at 9:39 AM, Saisai Shao  wrote:
> 
> I think you have to make this csv file accessible from Spark cluster, putting 
> to HDFS is one possible solution. 
> 
>> On Tue, Jul 25, 2017 at 1:26 AM, Joaquín Silva  wrote:
>> Hello,
>> 
>>  
>> 
>> I'm building a BASH program (using Curl)  that should run a Spark code 
>> remotely using Livy. But one of the code argument  is a CSV file, how can I 
>> make that spark reads this file?. The file is going to be in client side, 
>> not in the Spark cluster machines.
>> 
>>  
>> 
>> Regards,
>> 
>>  
>> 
>> Joaquín Silva
>> 
>>  
>> 
>