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.
精彩评论