Is there a way to copy only certain files, for example, based on the file type using fs -get or fs -copyToLocal? Note. I would like this to be recursive and cross the entire cluster.
Thought, but I can not answer my question.
Here's how we did it. Just wrote a quick shell script.
mkdir /tmp/txt
for F in `hadoop fs -fs hdfs://namenode.mycluster -lsr / | grep '/*.txt$' | awk '{print $NF}';
do
hadoop fs -fs hdfs://namenode.mycluster -copyToLocal $F /tmp/las/
done
source
share