hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Istabrak Abdul-Fatah <ifa...@gmail.com>
Subject Invoking a MapRed job via Runtime class
Date Wed, 07 Oct 2015 14:28:33 GMT
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) {



View raw message