Alex Rivera | Logout

Hadoop DistCp using wildcards?

Asked 2011-04-18T21:21:24.247
18

Is it possible to use DistCp to copy only files that match a certain pattern? For example. For /foo I only want *.log files.

Edit
Report

1 Answer

2

DistCp is in fact just a regular map-reduce job: you can use the same globbing syntax as you would use for input of a regular map-reduce job. Generally, you can just use foo/*.log and that should suffice. You can experiment with hadoop fs -ls statement here - if globbing works with fs -ls, then if will work with DistCp (well, almost, but differences are fairly subtle to mention).

answered 2011-04-18T21:26:19.547

Your Answer