First time here? Checkout the FAQ!
x
+1 vote
564 views
asked in Cloud Computing by (610 points)  
Is there any way to download a file directly into HDFS?
  

1 Answer

0 votes
answered by (116k points)  

Yes, please use curl as follows:

curl -sS https://www.google.com/robots.txt | hadoop fs -put - /robots.txt

It downloads the robots.txt file and put it directly to /robots.txt on your HDFS. You can check it by running the following command afterward:

hadoop fs -ls /
...