Hi Oliver,
I ran into the same problem a few weeks ago. What you want to do now is use the classes Job and Configuration. Here's basically what you need to do:
Configuration conf = 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 = 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
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önhauser 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