package com.cloudera.flume.collector;
import java.io.IOException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.FileUtil;
import org.apache.hadoop.fs.Path;
public static void main(String[] argv)
throws IOException {
if (argv.length < 2) {
System.out.println("Need to specify arguments <src> <dst>");
System.exit(-1);
}
Configuration conf = new Configuration();
Path srcPath = new Path(argv[0]);
FileSystem srcFs = srcPath.getFileSystem(conf);
Path dstPath = new Path(argv[1]);
FileSystem dstFs = dstPath.getFileSystem(conf);
FileUtil.copy(srcFs, srcPath, dstFs, dstPath, false, conf);
}
}