如何在不将整个文件下载到本地磁盘的情况下下载 tar.gz 并将其打包到 hdfs?

How to download tar.gz and uppack it to hdfs without downloading the whole file to local disk?

我想将 tar.gz 文件从 Web 直接提取到 hdfs 中。 跳过下载到本地磁盘阶段,因为文件可能非常大。

这全部来自简单的 cmd 行脚本(bash、wget 等)

好的,看起来这个衬垫有效:

wget -O - http://...tar.gz | tar xfz - --to-stodout | hadoop dfs -put - /somepath