You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Bai Shen <ba...@gmail.com> on 2012/10/01 15:32:09 UTC

java.lang.IllegalStateException: Job in state DEFINE instead of RUNNING

I'm running Nutch against a CDH4 cluster.  I keep getting the following
stack trace.  Not sure what the problem is.  Any suggestions?

12/10/01 09:27:25 ERROR crawl.WebTableReader: WebTableReader:
java.lang.IllegalStateException: Job in state DEFINE instead of RUNNING
        at org.apache.hadoop.mapreduce.Job.ensureState(Job.java:66)
        at org.apache.hadoop.mapreduce.Job.isSuccessful(Job.java:347)
        at
org.apache.nutch.crawl.WebTableReader.run(WebTableReader.java:530)
        at
org.apache.nutch.crawl.WebTableReader.processStatJob(WebTableReader.java:218)
        at
org.apache.nutch.crawl.WebTableReader.run(WebTableReader.java:479)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
        at
org.apache.nutch.crawl.WebTableReader.main(WebTableReader.java:412)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:208)

Re: java.lang.IllegalStateException: Job in state DEFINE instead of RUNNING

Posted by Harsh J <ha...@cloudera.com>.
Vinod's right, but its just "waitForCompletion(true|false);" you ought
to use for isSuccessful() checks afterwards, cause with submit(),
which is a non-blocking way of submission, you'll end up immediately
checking it and get a false always, cause the state will still be
mostly RUNNING at that moment of check.

On Mon, Oct 1, 2012 at 10:13 PM, Vinod Kumar Vavilapalli
<vi...@hortonworks.com> wrote:
>
> You will have to submit your job via submit() or waitForCompletion() before
> you can check for its success/failure state.
>
> HTH
> +Vinod Kumar Vavilapalli
> Hortonworks Inc.
> http://hortonworks.com/
>
>
> On Oct 1, 2012, at 6:32 AM, Bai Shen wrote:
>
> I'm running Nutch against a CDH4 cluster.  I keep getting the following
> stack trace.  Not sure what the problem is.  Any suggestions?
>
> 12/10/01 09:27:25 ERROR crawl.WebTableReader: WebTableReader:
> java.lang.IllegalStateException: Job in state DEFINE instead of RUNNING
>        at org.apache.hadoop.mapreduce.Job.ensureState(Job.java:66)
>        at org.apache.hadoop.mapreduce.Job.isSuccessful(Job.java:347)
>        at
> org.apache.nutch.crawl.WebTableReader.run(WebTableReader.java:530)
>        at
> org.apache.nutch.crawl.WebTableReader.processStatJob(WebTableReader.java:218)
>        at
> org.apache.nutch.crawl.WebTableReader.run(WebTableReader.java:479)
>        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
>        at
> org.apache.nutch.crawl.WebTableReader.main(WebTableReader.java:412)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>        at java.lang.reflect.Method.invoke(Method.java:601)
>        at org.apache.hadoop.util.RunJar.main(RunJar.java:208)
>
>



-- 
Harsh J

Re: java.lang.IllegalStateException: Job in state DEFINE instead of RUNNING

Posted by Vinod Kumar Vavilapalli <vi...@hortonworks.com>.
You will have to submit your job via submit() or waitForCompletion() before you can check for its success/failure state.

HTH
+Vinod Kumar Vavilapalli
Hortonworks Inc.
http://hortonworks.com/


On Oct 1, 2012, at 6:32 AM, Bai Shen wrote:

> I'm running Nutch against a CDH4 cluster.  I keep getting the following
> stack trace.  Not sure what the problem is.  Any suggestions?
> 
> 12/10/01 09:27:25 ERROR crawl.WebTableReader: WebTableReader:
> java.lang.IllegalStateException: Job in state DEFINE instead of RUNNING
>        at org.apache.hadoop.mapreduce.Job.ensureState(Job.java:66)
>        at org.apache.hadoop.mapreduce.Job.isSuccessful(Job.java:347)
>        at
> org.apache.nutch.crawl.WebTableReader.run(WebTableReader.java:530)
>        at
> org.apache.nutch.crawl.WebTableReader.processStatJob(WebTableReader.java:218)
>        at
> org.apache.nutch.crawl.WebTableReader.run(WebTableReader.java:479)
>        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
>        at
> org.apache.nutch.crawl.WebTableReader.main(WebTableReader.java:412)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>        at java.lang.reflect.Method.invoke(Method.java:601)
>        at org.apache.hadoop.util.RunJar.main(RunJar.java:208)