Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-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 81927D77C for ; Thu, 20 Dec 2012 06:02:02 +0000 (UTC) Received: (qmail 92371 invoked by uid 500); 20 Dec 2012 06:01:57 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 92259 invoked by uid 500); 20 Dec 2012 06:01:56 -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 92075 invoked by uid 99); 20 Dec 2012 06:01:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Dec 2012 06:01:56 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of harsh@cloudera.com designates 209.85.210.179 as permitted sender) Received: from [209.85.210.179] (HELO mail-ia0-f179.google.com) (209.85.210.179) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Dec 2012 06:01:50 +0000 Received: by mail-ia0-f179.google.com with SMTP id o25so2531149iad.24 for ; Wed, 19 Dec 2012 22:01:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-gm-message-state; bh=lkHOtexK6EWGIrUAZIOwlUvWmVCrNZnw286+tl3Hivk=; b=JJGY4PVyl9P0Ui1/PS5HjI2jGowzUOW76Ds9YONNByh5q5r3/agR0i1qVbFgRKf0rO nIxqc2VnrmKevGY/r6SxxdVcbMfZQ/0H6psV3RtLmO1Q/UD/vnmVlEPTLaV8g8Amb0gj jUPODGfpJXYbeMbZl6iMLzOhEdZR38JCYKy5r6TYrvzMxbmEkNjDG9xA+/52XN+8c9AN ij1qOFXJ1XvJiGVDihzEfeb8CiJ7QsBPFLG4Fe5dk2FSEHh8XUvXUbWdDJdKD1Q/t37h A3jyXFftJrDfh4l0lBTc6AAoVhtSe32uNVv7glVEho5Y00TvW6SBl6Q7q9bF5/e6oLxl yFfA== Received: by 10.42.48.147 with SMTP id s19mr8066646icf.18.1355983289428; Wed, 19 Dec 2012 22:01:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.6.129 with HTTP; Wed, 19 Dec 2012 22:01:09 -0800 (PST) In-Reply-To: References: From: Harsh J Date: Thu, 20 Dec 2012 11:31:09 +0530 Message-ID: Subject: Re: Development against hadoop v 0.23.5 To: virappan@gmail.com Cc: "" Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQnO+oDAZN3CUUfHTPNFoCbyHrdDU6frxo4etkuoDOOUp8vXR+ZQPpUpPoN26CKViZBiZxJF X-Virus-Checked: Checked by ClamAV on apache.org Hi Anil, Usage oriented questions should be directed at user@hadoop.apache.org. Also, you are running into an MR2 issue (not related to YARN - which is just a platform MR2 runs on. See [1]). I've moved this to the proper thread (bcc'd yarn-dev). My replies inline. On Thu, Dec 20, 2012 at 6:06 AM, anil chaurasia wrote: > Hi All, > > I have a small prototype application that was running against 1.0.X version > of hadoop. > We wanted to try out the hadoop-yarn to get some number using the yarn > release and setup a single node hadoop system. > > When I run the job with hadoop 1.0.X it works fine but when I try to run it > against the 0.23.5 I get following error: > > Exception in thread "main" java.lang.IncompatibleClassChangeError: Found > interface org.apache.hadoop.mapreduce.JobContext, but class was expected Upgrading jobs from 1.x to 2.x (or 0.23.x), requires that your jobs be recompiled against the new version, cause there are incompatible changes in this upgrade that a recompilation helps catch and also resolve. > I am sure that there are significant changes to the hadoop framework in > YARN release. > So I decided to change the code as per the new interface. I don't think you need to change much code as the APIs are still the same. A recompilation against proper new dependencies should do the trick. > But when I try to use the maven to import the dependecies, maven complains > about the artifacts. ( The maven repo only has pom.xml files and no jar > files are included . ) Can you share your ? In 1.x you may have had "hadoop-core" as one dependency. In 2.x (or 0.23.x, a subset), you have several broken out components so we provide a wrapper dependency called "hadoop-client" which should be all that you need to include. There is no more "hadoop-core" in 2.x (or 0.23.x). > I was using maven dependency hadoop-core for ( 1.0.X) and it was working so > I though I would get the yarn-core/yarn-project/hadoop-yarn but all of them > had missing artifacts. > > One thing I did notice that the other yarn modules such as > hadoop-yarn-common did have artifcats. The 0.23.5 artifacts are all available on the Apache Maven repositories http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-client/0.23.5/ > So, I wanted to know what are all the modules required to build a hadoop > application using hadoop-yarn. Any regular hadoop application may simply include hadoop-client to pull in all dependencies. P.s. You aren't exactly writing an YARN app, but an MR2 job (MR is an app, you do not need to write that as its provided to you already). [1] again. > Is there a document on how to write a sample app using yarn somewhere on > the wiki ? IF there is no wiki, Could someone please point me to some > documents where I can find information on how to write a new app using > hadoop-yarn. If you are interested in writing a distributed application (which is not the same as writing an MR job), you can read [2]. [1] - http://www.cloudera.com/blog/2012/10/mr2-and-yarn-briefly-explained/ [2] - http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/WritingYarnApplications.html -- Harsh J