Return-Path: X-Original-To: apmail-hadoop-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BB7B910C40 for ; Mon, 9 Dec 2013 22:01:13 +0000 (UTC) Received: (qmail 95621 invoked by uid 500); 9 Dec 2013 22:01:08 -0000 Delivered-To: apmail-hadoop-user-archive@hadoop.apache.org Received: (qmail 95421 invoked by uid 500); 9 Dec 2013 22:01:08 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 95414 invoked by uid 99); 9 Dec 2013 22:01:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Dec 2013 22:01:08 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lordjoe2000@gmail.com designates 209.85.214.47 as permitted sender) Received: from [209.85.214.47] (HELO mail-bk0-f47.google.com) (209.85.214.47) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Dec 2013 22:01:01 +0000 Received: by mail-bk0-f47.google.com with SMTP id mx12so1618761bkb.20 for ; Mon, 09 Dec 2013 14:00:41 -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=mz7tjfp/FSUygUZmKJkqlyj16sowefLw/S/Ln4Fqtww=; b=kZFgmeEheHGpX40R4HLuFRwnfhCxRdQa+cFxS1EjbrwS7+aquAYqvGH4AGdSz0gh9M jqXIADJyKeY6mUMwgUsXRuXyd+k8eKi+94JQlGydKlFjs2cDvf6fQ6d8w6U6FpDq/c15 heCjIW9aMjB+KuqgOjBn44Vs5B674Gp0n5nTLNHa3UhC8RjorMXrhSJBFIKqWBCr6R/Y tEfWQfdjLWF94uBhKUP2O38gVZSjCo1WrZopmX69MIaiZWXDqOXhBmDiJOs6vejqPwOh xzFNhPYhwycqqVbS/M39P2G8LoJ5CEL5Ca6gD1L5T9PFEY6yr6F3NYqtZ3ZDLdS0kEVv AmeA== MIME-Version: 1.0 X-Received: by 10.205.43.136 with SMTP id uc8mr3048463bkb.87.1386626440980; Mon, 09 Dec 2013 14:00:40 -0800 (PST) Received: by 10.205.4.137 with HTTP; Mon, 9 Dec 2013 14:00:40 -0800 (PST) In-Reply-To: References: Date: Mon, 9 Dec 2013 14:00:40 -0800 Message-ID: Subject: Re: Execute hadoop job remotely and programmatically From: Steve Lewis To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=bcaec52bf1ef7392f804ed2120a3 X-Virus-Checked: Checked by ClamAV on apache.org --bcaec52bf1ef7392f804ed2120a3 Content-Type: text/plain; charset=ISO-8859-1 out them in a lib directory in the jar you pass to Hadoop and they will be found On Mon, Dec 9, 2013 at 12:58 PM, Yexi Jiang wrote: > Hi, All, > > I am working on a project that requires to execute a hadoop job remotely > and the job requires some third-part libraries (jar files). > > Based on my understanding, I tried: > > 1. Copy these jar files to hdfs. > 2. Copy them into the distributed cache using > DistributedCache.addFileToClassPath so that hadoop can spread these jar > files to each of the slave nodes. > > However, my program still throws ClassNotFoundException. Indicating that > some of the classes cannot be found when the job is running. > > So I'm wondering: > 1. What is the correct way to run a job remotely and programmatically > while the job requires some third-party jar files. > 2. I found DistributedCache is deprecated (I'm using hadoop 1.2.0), what > is the alternative class? > > Regards, > Yexi > -- Steven M. Lewis PhD 4221 105th Ave NE Kirkland, WA 98033 206-384-1340 (cell) Skype lordjoe_com --bcaec52bf1ef7392f804ed2120a3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
out them in =A0a lib directory in the jar you pass to Hado= op and they will be found


On Mon, Dec 9, 2013 at 12:58 PM, Yexi Jiang <yexijiang= @gmail.com> wrote:
Hi, All,

I am working on a project that requires to execute a ha= doop job remotely and the job requires some third-part libraries (jar files= ).

Based on my understanding, I tried:

1. Copy these jar files to hdfs.
2. Copy them into= the distributed cache using DistributedCache.addFileToClassPath so that ha= doop can spread these jar files to each of the slave nodes.=A0

However, my program still throws ClassNotFoundException. Ind= icating that some of the classes cannot be found when the job is running.

So I'm wondering:
1. What is the corr= ect way to run a job remotely and programmatically while the job requires s= ome third-party jar files.
2. I found DistributedCache is deprecated (I'm using hadoop 1.2.0)= , what is the alternative class?

Regards,
Yexi



--
Steven M. Le= wis PhD
4221 105th Ave NE
Kirkland, WA 98033
206-38= 4-1340 (cell)
Skype lordjoe_com

--bcaec52bf1ef7392f804ed2120a3--