开发者

How to set the map task timeout?

开发者 https://www.devze.com 2023-03-14 14:45 出处:网络
I tried this Configuration conf = new Configuration(); conf.set(\"mapred.task.timeout\", \"1000\"); Job job = new Job(conf);

I tried this

Configuration conf = new Configuration();
conf.set("mapred.task.timeout", "1000");
Job job = new Job(conf);

But I think it is not working. I am trying to set mapred.task.timeout to 1000 and in the map class I am giving a " Thread.sleep(2000开发者_如何学Python); " and expecting it to throw an exception. But it it running fine. Shouldn't this throw an exception?


That is an old, deprecated config setting. It may be that you need the newer equivalent, mapreduce.task.timeout. Also, call Configuration.setInt() instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消