First time here? Checkout the FAQ!
x
+1 vote
522 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 (115k 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 /
...