Hi Ista, IIUC you just want it to be submitted and not wait till it finish and print the stats ? Basically sample code which you might be referring will be creating the instance of "org.apache.hadoop.mapreduce.Job" and setting with the req configurations calling job.waitForCompletion(true); Instead you can just call job.submit();
Regards, Naga ________________________________ From: Istabrak Abdul-Fatah [[email protected]] Sent: Wednesday, October 07, 2015 19:58 To: [email protected] Subject: Invoking a MapRed job via Runtime class Greetings to all, Is it possible to invoke a MapReduce job from another java class using the runtime command? If not, what are the alternatives? Here is a sample code snippet: public static void main(String[] args) { Runtime rt = Runtime.getRuntime(); try { Process p = rt.exec("yarn jar /opt/yarn/my_examples/AvgSeven.jar -Dtest=\"9999\" /user/yarn/input/samplefile.csv output"); } catch (IOException e) { e.printStackTrace(); } Regards, Ista
