Hi,

I want this because I want to create depency between 2 jobs. The first job execute the wordcount example, and the second job copy the output of the wordcount to another HDFS. Therefore, I want to create a job (job 2) that includes the code to copy data to another HDFS. The code is below. Is there a way to do it with the API?

|         // Put inside a job()
        String proto = "webhdfs://";
        String src = "hadoop-coc-1/input1";
        String dest = "hadoop-coc-2/input1";
        List<Path> lsrc = new ArrayList<Path>();
        lsrc.add(new Path(proto+src));
        DistCpOptions options = new DistCpOptions(lsrc, new Path(proto+dest));
        DistCp distcp = new DistCp(conf, options);
        distcp.execute();
|

​

Reply via email to