You can use the FileUtil api to do this. Example:
Configuration configuration = new Configuration();
configuration.set("fs.defaultFS", "hdfs://xyz:1234");
FileSystem filesystem = FileSystem.get(configuration);
FileUtil.copy(filesystem, new Path("src/path"), filesystem, new Path("dst/path"), false, configuration);