Return-Path: Delivered-To: apmail-hadoop-common-user-archive@www.apache.org Received: (qmail 12032 invoked from network); 21 Oct 2009 20:12:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Oct 2009 20:12:46 -0000 Received: (qmail 3907 invoked by uid 500); 21 Oct 2009 20:12:43 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 3850 invoked by uid 500); 21 Oct 2009 20:12:43 -0000 Mailing-List: contact common-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-user@hadoop.apache.org Delivered-To: mailing list common-user@hadoop.apache.org Received: (qmail 3840 invoked by uid 99); 21 Oct 2009 20:12:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Oct 2009 20:12:43 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ryan.justin.smith@gmail.com designates 209.85.219.209 as permitted sender) Received: from [209.85.219.209] (HELO mail-ew0-f209.google.com) (209.85.219.209) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Oct 2009 20:12:33 +0000 Received: by ewy5 with SMTP id 5so3725407ewy.36 for ; Wed, 21 Oct 2009 13:12:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=wlll1lFThDeEisfSH6OtVMuifrsz92HO8kDi3blj3Pg=; b=sDqWj/DMjya9NJGMm0Xtqy8fh63n3HklmmgYfKgBpzKbm1gt4KZqzEe1fxpkWdCKZo L2AeuUukStCNw4qBXzJ1Fd3+AMyU4TQFJz6pURMeYn/HrhwpxG2aT3dXy3aasPCyKkM9 dCTEqea0eQm9N9qFbnPwI+TmI7Lnw9MT5of7Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=HEJHOY8W+jHscYxYJyNCidphLqafQthkCpptUT8xtFSlR74auTqjsAw8cCLivPNm2w 95orJ6EhMdvVnv3N84E7ZS3GcUOvSuZNKObW0JlNXS/H/oqF1czzKLjDsFbIMNdu+P/P KWQe0Uk4SlmV6LRZl0hTD4L7Me3qRjZxBptRk= MIME-Version: 1.0 Received: by 10.216.87.134 with SMTP id y6mr2995856wee.20.1256155930906; Wed, 21 Oct 2009 13:12:10 -0700 (PDT) In-Reply-To: <5D66A842901F8E41815AF6D27A28EC490A84DF40F3@Mail-Ab02.rmg-ny.com> References: <4ADF0345.2050601@swe-blog.net> <5D66A842901F8E41815AF6D27A28EC490A84DF40F3@Mail-Ab02.rmg-ny.com> Date: Wed, 21 Oct 2009 16:12:10 -0400 Message-ID: Subject: Re: Using Configuration instead of JobConf From: Ryan Smith To: common-user@hadoop.apache.org Content-Type: multipart/alternative; boundary=0016e6d77e880b507a04767798be X-Virus-Checked: Checked by ClamAV on apache.org --0016e6d77e880b507a04767798be Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Also, FileInputFormat is deprecated in hadoop 0.20.1. On Wed, Oct 21, 2009 at 10:15 AM, Mark Vigeant wrote: > Hi Oliver, > > I ran into the same problem a few weeks ago. What you want to do now is u= se > the classes Job and Configuration. Here's basically what you need to do: > > > Configuration conf =3D new Configuration(); //creates the configuration > object > conf.set(TableOutputFormat.OUTPUT_TABLE, name); //set the output format: > I'm using this for HBase so it's an HTable. > Job job =3D new Job(conf, NAME); > job.setJarByClass(TableUploader.class); > job.setInputFormatClass(FileInputFormat.class); > job.setMapperClass(MapExample.class); > job.setNumReduceTasks(0); //alternately, you could set a Reducer class. > Check the API > FileInputFormat.setInputPaths(job, new Path(input)); > job.setOutputFormatClass(TableOutputFormat.class); > job.waitForCompletion(true); //submits the job, waits for it to be > completed. > > -----Original Message----- > From: Oliver B. Fischer [mailto:o.b.fischer@swe-blog.net] > Sent: Wednesday, October 21, 2009 8:49 AM > To: common-user@hadoop.apache.org > Subject: Using Configuration instead of JobConf > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > according to the API-Dokumentation of 0.20.1 JobConf is deprecated and > we should use Configuration instead. However all examples on the webpage > still referece JobConf. > > Is there a good example for replacing JobConf by Configuration? > > Regards, Oliver > > - -- > Oliver B. Fischer, Sch=F6nhauser Allee 64, 10437 Berlin > Tel. +49 30 44793251, Mobil: +49 178 7903538 > Mail: o.b.fischer@swe-blog.net Blog: http://www.swe-blog.net > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iQEcBAEBAgAGBQJK3wNFAAoJELeiwuwqd1DGf4YH/3P83TQh+7L0GiKT4rdIe1HC > LdZ1weVcqnBKfFZYCsL64PfwPGhkl0hoTU/sU29qGGrnAN8QKbF/8m2P32RlysCV > ONT2nUlugHfEb8iQzF8Xx3uuCzU3AXYHK0eqme+thzfscxZKiGKzLTYb26qFnufG > AtTIEKMkv5SRLIn5YRFM/49dcSp2WIRCIEcc+0eofsxFvI9X2a8Sg8AMG5JzNqYT > SHMGSr3boBc4gFCNTCsRmJQIusPVWyJZICVss0q3491xdMVvGfAPTsbb6BLINFkL > j5BrbC9OaNnmX3X3kR2/orABwMj9y5Xd1YjXepeWG3QD3WftPVyoCIOE1v8m2s0=3D > =3DOFkK > -----END PGP SIGNATURE----- > --0016e6d77e880b507a04767798be--