Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hadoop HDFS copy with wildcards?

Tags:

copy

hadoop

hdfs

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.

like image 473
WestCoastProjects Avatar asked Jan 05 '14 20:01

WestCoastProjects


1 Answers

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

hdfs fs -cp "/path/to/foo*" /path/to/bar/
like image 103
MoreFreeze Avatar answered Sep 26 '22 09:09

MoreFreeze