Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
MapReduce, mail # user - Cannot kill a job with correct job ID.


Copy link to this message
-
Cannot kill a job with correct job ID.
Francis.Hu 2013-08-20, 09:37
Hi, All

 

In my resources manager web page, I see the job
application_1376968101508_0009 is running.

I want to kill the job with the command:  bin/mapred job -kill
application_1376968101508_0009

It throws below error at all the time :

 

Exception in thread "main" java.lang.IllegalArgumentException: JobId string
: application_1376968101508_0009 is not properly formed

        at org.apache.hadoop.mapreduce.JobID.forName(JobID.java:156)

        at org.apache.hadoop.mapreduce.tools.CLI.run(CLI.java:276)

        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)

        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)

        at org.apache.hadoop.mapred.JobClient.main(JobClient.java:1199)

 

And then looked at the source code of JobID class, found below method :
JobID.forName(String).

It means we need to kill a job with name "job_1376968101508_0009", not
"application_1376968101508_0009".

That is really strange to kill a job with special name and without the
actual job name showing in resources manager UI.

Is this an existing issue ?

 

protected static final String JOB = "job";

public static JobID forName(String str) throws IllegalArgumentException {

    if(str == null)

      return null;

    try {

      String[] parts = str.split("_");

      if(parts.length == 3) {

        if(parts[0].equals(JOB)) {

          return new org.apache.hadoop.mapred.JobID(parts[1],

 
Integer.parseInt(parts[2]));

        }

      }

    }catch (Exception ex) {//fall below

    }

    throw new IllegalArgumentException("JobId string : " + str

        + " is not properly formed");

  }

 

 

Thanks,

Francis.Hu