Ben
Ben

Reputation: 21

How can I transfer a zip file directly from a URL to HDFS by using Java?

How can I transfer a zip file from a URL to HDFS by using Java? I am not supposed to download it. I can only transfer the file directly from URL to HDFS. Anyone has some idea would work out?

Upvotes: 1

Views: 616

Answers (1)

Morito
Morito

Reputation: 93

You can use a simple ssh code like:

wget http://domain/file.zip

and then

hadoop fs -put /path/file.zip

In java, you should download the file and then put it in hdfs

Upvotes: 1

Related Questions