Return-Path: X-Original-To: apmail-crunch-user-archive@www.apache.org Delivered-To: apmail-crunch-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 71DE01793B for ; Fri, 21 Nov 2014 22:28:43 +0000 (UTC) Received: (qmail 65925 invoked by uid 500); 21 Nov 2014 22:28:43 -0000 Delivered-To: apmail-crunch-user-archive@crunch.apache.org Received: (qmail 65878 invoked by uid 500); 21 Nov 2014 22:28:43 -0000 Mailing-List: contact user-help@crunch.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@crunch.apache.org Delivered-To: mailing list user@crunch.apache.org Received: (qmail 65868 invoked by uid 99); 21 Nov 2014 22:28:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Nov 2014 22:28:43 +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 (athena.apache.org: domain of mkwhitacre@gmail.com designates 209.85.214.182 as permitted sender) Received: from [209.85.214.182] (HELO mail-ob0-f182.google.com) (209.85.214.182) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Nov 2014 22:28:38 +0000 Received: by mail-ob0-f182.google.com with SMTP id m8so4738587obr.13 for ; Fri, 21 Nov 2014 14:27:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=BJqaNgQWMRgszPc5bBLMyVhncHoJtcSQSDUihuVBm6U=; b=A4KevQ2HGDD7vDvrETDR4wisoHZz+pBqBgspk88EqZ5HiW7sIBdCeus/PO2H2ecsIe Tvn0A6MtPQl4QkYgKhTm3MA/2ycF6zMpC8tANySQ/0Vi/AvZKLMWbsNTaJkmNB+FEFnd XcZuMOn2fO/oLLqBPACKUlHOY1ZLjdD/ffwjWrveB3D80uSh5CJNivgz3aM6T5MrA7sH q8Qd0ULjz28GCFIvLRjyg6lgeCSpjiV8/vGV/BDE9clpyFSVqnuU0j+AFdZFFMZqV27Y CsMFOhIg3zh870w+79AF0s5zO9kZbXguzpF0gLw8OhW8lGGlg6qw7JLpTiHhm3wZCach D8Hg== MIME-Version: 1.0 X-Received: by 10.202.232.213 with SMTP id f204mr4391174oih.51.1416608853409; Fri, 21 Nov 2014 14:27:33 -0800 (PST) Received: by 10.202.128.17 with HTTP; Fri, 21 Nov 2014 14:27:33 -0800 (PST) In-Reply-To: References: Date: Fri, 21 Nov 2014 16:27:33 -0600 Message-ID: Subject: Re: ClassNotFoundException: Class org.apache.crunch.impl.mr.run.CrunchMapper From: Micah Whitacre To: user@crunch.apache.org Content-Type: multipart/alternative; boundary=001a11403e7a7e47f7050865f3ef X-Virus-Checked: Checked by ClamAV on apache.org --001a11403e7a7e47f7050865f3ef Content-Type: text/plain; charset=UTF-8 The support of a lib folder inside of a jar is not necessarily guaranteed to be supported on all versions of Hadoop.[1] We typically go with the "uber" jar where we use maven-shade-plugin to actually explode the crunch dependencies and others into the assembly jar. Another approach since you are using Oozie is to include the jar in the workflow lib directory. That should put the jar on the classpath. The last approach is obviously to manually use DistributedCache yourself which will distribute it out to the cluster. [1] - http://blog.cloudera.com/blog/2011/01/how-to-include-third-party-libraries-in-your-map-reduce-job/ On Fri, Nov 21, 2014 at 4:15 PM, Mike Barretta wrote: > All, > > I'm running an MRPipeline from crunch-core 0.11.0-hadoop2 on a CDH5.1 > cluster via oozie. While the main job runs okay, the doFn() it calls fails > due to the CNFE. The jar containing my classes does indeed contain > lib/crunch-core-0.11.0-hadoop2.jar. > > Does the crunch jar need to be added to the hadoop lib on all nodes? It > seems like that would/should be unnecessary. > > Thanks, > Mike > --001a11403e7a7e47f7050865f3ef Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The support of a lib folder inside of a jar is not necessa= rily guaranteed to be supported on all versions of Hadoop.[1]=C2=A0
We typically go with the "uber" jar where we use mave= n-shade-plugin to actually explode the crunch dependencies and others into = the assembly jar.=C2=A0 Another approach since you are using Oozie is to in= clude the jar in the workflow lib directory.=C2=A0 That should put the jar = on the classpath.=C2=A0 The last approach is obviously to manually use Dist= ributedCache yourself which will distribute it out to the cluster.

=

On Fri, Nov 21, 2014 at 4:15 PM, Mike Barretta = <mike.barre= tta@gmail.com> wrote:
All,

I'm running an MRPipeline from crunch-core 0.11.0-hado= op2=C2=A0on a CDH5.1 cluster via oozie.=C2=A0 While the main job runs okay,= the doFn() it calls fails due to the CNFE.=C2=A0 The jar containing my cla= sses does indeed contain lib/crunch-core-0.11.0-hadoop2.jar.

Does the = crunch jar need to be added to the hadoop lib on all nodes?=C2=A0 It seems = like that would/should be unnecessary.

Thanks,
Mike=C2=A0

--001a11403e7a7e47f7050865f3ef--