我正在使用MRUnit测试MapReduce代码。我不能使用.withInputValue,因为它已被弃用。我找不到有效的等效项。setInputValue也不起作用。解决方法是什么? 最佳答案 使用withInput()。示例(这与mrunit-1.0.0-hadoop2.jar一起使用)MapDrivermapDriver;...mapDriver.withInput(newLongWritable(),newText("somelineoftext));mapDriver.withOUtput(newText("somekey