Hadoop HDFS使用通配符复制? [英] Hadoop HDFS copy with wildcards?

查看:858
本文介绍了Hadoop HDFS使用通配符复制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从hdfs中复制特定格式的文件到同一hdfs集群中的另一个位置。 dfs shell似乎无法处理这个问题:

I want to copy a certain pattern of files from within hdfs to another location in the same hdfs cluster. The dfs shell does not seem to be able to handle this:

hadoop dfs -cp /tables/weblog/server=jeckle/webapp.log.1* /tables/tinylog/server=jeckle/

没有错误返回:也不复制文件。

No error is returned: yet also no files are copied.

推荐答案

您需要对包含通配符的路径使用双引号,如下所示:

You need use double quote with your path that contains wildcard, like this:

hdfs fs -cp "/path/to/foo*" /path/to/bar/

这篇关于Hadoop HDFS使用通配符复制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆