hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xeonmailinglist <xeonmailingl...@gmail.com>
Subject create Job with java code.
Date Tue, 03 Feb 2015 18:19:41 GMT
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();
|

‚Äč

Mime
View raw message