Return-Path: X-Original-To: apmail-giraph-user-archive@www.apache.org Delivered-To: apmail-giraph-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BF0A4103AC for ; Wed, 8 Jan 2014 21:14:12 +0000 (UTC) Received: (qmail 14309 invoked by uid 500); 8 Jan 2014 21:14:12 -0000 Delivered-To: apmail-giraph-user-archive@giraph.apache.org Received: (qmail 14269 invoked by uid 500); 8 Jan 2014 21:14:12 -0000 Mailing-List: contact user-help@giraph.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@giraph.apache.org Delivered-To: mailing list user@giraph.apache.org Received: (qmail 14261 invoked by uid 99); 8 Jan 2014 21:14:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jan 2014 21:14:12 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of soozandjohnyost@gmail.com designates 209.85.212.44 as permitted sender) Received: from [209.85.212.44] (HELO mail-vb0-f44.google.com) (209.85.212.44) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jan 2014 21:14:05 +0000 Received: by mail-vb0-f44.google.com with SMTP id x8so1555702vbf.31 for ; Wed, 08 Jan 2014 13:13:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=NlIM2/XoGbtQ61LmwbErd/U/96LIzF4z2env5yZeodo=; b=Jk9XwgrfAPMA4h00mbDzwN2iJmxWDpeOI+lYEVqiWwUBM4TZUozZA4AuGUUOAQldzh 1x3i40/4YUsSvRL0k3wYVUuPqcif8117aEb25hqVkPxZVNaIxt5LYuZlP916IPjyL9Xy ItT/7/TTyD4qZWm50uKQkFtOvKDIy+MJ/iW68j0J3oGMVtNiGJoZCgsBDq7EOJd7VSJv hpD9uyaLW7SzOOPQx6TFcRb6AvcsnhLk9pQlui+P2QmZ8yn1zioWGBTP4b/VhBSDpGyb sTVoRJ7e+MpM7ynTZxbc6K0PvbFwZJY06IVall3MB8goaF4kYgiFB240VaEGLbRRdnR5 LqXw== MIME-Version: 1.0 X-Received: by 10.58.227.38 with SMTP id rx6mr3933393vec.10.1389215624783; Wed, 08 Jan 2014 13:13:44 -0800 (PST) Received: by 10.52.159.163 with HTTP; Wed, 8 Jan 2014 13:13:44 -0800 (PST) Date: Wed, 8 Jan 2014 16:13:44 -0500 Message-ID: Subject: ClassCastException: org.apache.giraph.conf.GiraphConfiguration cannot be cast to org.apache.hadoop.mapred.JobConf From: John Yost To: user@giraph.apache.org Content-Type: multipart/alternative; boundary=047d7bd6b5b4d50cef04ef7bf725 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bd6b5b4d50cef04ef7bf725 Content-Type: text/plain; charset=ISO-8859-1 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$1.run(Job.java:513) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1149) at org.apache.hadoop.mapreduce.Job.connect(Job.java:511) at org.apache.hadoop.mapreduce.Job.submit(Job.java:499) at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:530) at com.johnyost.analytics.TwitterSpringRunner.run(TwitterSpringRunner.java:72) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) Looking at the Hadoop Job source code, the ClassCastException is being thrown here: private void connect() throws IOException, InterruptedException { 511 ugi.doAs(new PrivilegedExceptionAction() { 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 Thanks --John --047d7bd6b5b4d50cef04ef7bf725 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Argh! =A0Sorry, accidentally sent email. =A0

I am encou= ntering a ClassCastException in my custom Tool class:

1= 4/01/08 15:58:15 ERROR step.AbstractStep: Encountered an error executing th= e step
java= .lang.ClassCastException: org.apache.giraph.conf.GiraphConfiguration cannot= be cast to org.apache.hadoop.mapred.JobConf
at org.apache.hadoop.mapreduce.Job$1.run(Job.j= ava:513)
at java.security.AccessControlle= r.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.ja= va:415)
at org.apache.hadoop.security.Use= rGroupInformation.doAs(UserGroupInformation.java:1149)
at org.apache.hadoop.mapreduce.Job.connect(Job= .java:511)
= at org.apache.hadoop.mapreduce= .Job.submit(Job.java:499)
at org.apache.hadoop.mapreduce.Job.waitForComp= letion(Job.java:530)
at com.johnyost.analytics.Twit= terSpringRunner.run(TwitterSpringRunner.java:72)
= at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)

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

private void connect()= throws IOException, InterruptedException {
511 = =A0 =A0ugi.doAs(new PrivilegedExceptionAction<Object>() {
512 =A0 =A0 =A0public Object run() throws IOException {
513 =A0 =A0 =A0 =A0jobClient =3D new JobClient((JobCon= f) getConfiguration()); =A0 =A0
514 =A0 =A0 =A0 =A0return null;
515 =A0 =A0 =A0}
516 =A0 =A0});

My job runs fine with GiraphRunner, and I see that class implement= s Tool and does not extend Configured like I did. =A0So... I changed my cla= ss definition to implements Tool instead of extends Configured and implemen= ts Tool, implementing getConf and setConf. =A0This did not help.

Any ideas? =A0This Exception is a real head-s= cratcher for me
Thanks
<= font face=3D"arial, sans-serif">
--John
--047d7bd6b5b4d50cef04ef7bf725--