【发布时间】:2015-05-08 14:06:54
【问题描述】:
public static class Reduce extends Reducer<Text, Text, Text, Text>
{
private Text txtReduceOutputKey = new Text("");
private Text txtReduceOutputValue = new Text("");
public void reduce(Text key, Iterator<Text> values, Context context) throws IOException, InterruptedException
{
//some code;
}
}
它没有给出任何错误。我能够访问该类,因为我能够启动这些变量txtReduceOutputKey 和txtReduceOutputValue。但reduce 方法在执行时被忽略。所以我无法运行上述方法中的代码//一些代码。我也在使用下面的包。
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.Job;
知道如何解决这个问题吗?
【问题讨论】:
标签: hadoop mapreduce reduce reducers