Please look this StackOverflow answer for the most effective way to use the HDFS FileUtils.copyMerge() command:

http://stackoverflow.com/a/41785085/501113