任务失败发生在mapreduce过程中

问题描述 投票:-1回答:1

我是hadoop mapreduce的新用户。我想测试mapreduce任务失败。谁能给我链接“测试mapreduce任务失败”的示例代码?

hadoop mapreduce
1个回答
0
投票

假设您需要Java程序,请从任何教程网站获取任何MapReduce示例工作程序。在Mapper代码中,只需写一行

throw new RuntimeException("My test exception");

同样,您可以测试Reducer代码。

© www.soinside.com 2019 - 2024. All rights reserved.