giraph-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Yost <>
Subject ClassCastException: org.apache.giraph.conf.GiraphConfiguration cannot be cast to org.apache.hadoop.mapred.JobConf
Date Wed, 08 Jan 2014 21:13:44 GMT
Argh!  Sorry, accidentally sent email.

I am encountering a ClassCastException in my custom Tool class:

14/01/08 15:58:15 ERROR step.AbstractStep: Encountered an error executing
the step
java.lang.ClassCastException: org.apache.giraph.conf.GiraphConfiguration
cannot be cast to org.apache.hadoop.mapred.JobConf
at org.apache.hadoop.mapreduce.Job$
at Method)
at org.apache.hadoop.mapreduce.Job.connect(
at org.apache.hadoop.mapreduce.Job.submit(
at org.apache.hadoop.mapreduce.Job.waitForCompletion(

Looking at the Hadoop Job source code, the ClassCastException is being
thrown here:

private void connect() throws IOException, InterruptedException {
511    ugi.doAs(new PrivilegedExceptionAction<Object>() {
512      public Object run() throws IOException {
513        jobClient = new JobClient((JobConf) getConfiguration());
514        return null;
515      }
516    });

My job runs fine with GiraphRunner, and I see that class implements Tool
and does not extend Configured like I did.  So... I changed my class
definition to implements Tool instead of extends Configured and implements
Tool, implementing getConf and setConf.  This did not help.

Any ideas?  This Exception is a real head-scratcher for me



View raw message