hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohammad Tariq <donta...@gmail.com>
Subject Re: Modify the number of map tasks
Date Wed, 12 Dec 2012 11:04:08 GMT
Hi Imen,

    You can add "mapred.map.tasks" property in your mapred-site.xml file.

But, it is just a hint for the InputFormat. Actually no. of maps is
actually determined by the no of InputSplits created by the InputFormat.

HTH

Regards,
    Mohammad Tariq



On Wed, Dec 12, 2012 at 4:11 PM, imen Megdiche <imen.megdiche@gmail.com>wrote:

> Hi,
>
> I try to force the number of map for the mapreduce job with the command :
>   public static void main(String[] args) throws Exception {
>
>           JobConf conf = new JobConf(WordCount.class);
>              conf.set("mapred.job.tracker", "local");
>          conf.set("fs.default.name", "local");
>           conf.setJobName("wordcount");
>
>           conf.setOutputKeyClass(Text.class);
>          conf.setOutputValueClass(IntWritable.class);
>
>            conf.setNumMapTask(6);
>           conf.setMapperClass(Map.class);
>           conf.setCombinerClass(Reduce.class);
>           conf.setReducerClass(Reduce.class);
> ...
> }
>
> But it doesn t work.
> What can i do to modify the number of map and reduce tasks.
>
> Thank you
>

Mime
View raw message