Hello,
I want to merge all files from output to one text file.
I looked into
http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/fs/FileUtil.html
and
found copyMerge method.
I trying to use it like that:
            FileSystem fs = FileSystem.get(conf);

            Path tmpout_path = new Path(output_dir.toString() + "-tmp");

            if(!FileUtil.copyMerge(fs, output_dir, fs, tmpout_path, false,
conf, null))
             throw new IllegalStateException("Can't merge files from "
             + output_dir.toString()
             + " to " + tmpout_path.toString());

But it always fail.
P.S. output_dir - directory, I check this by isDirectory method.
Thanks.

Reply via email to