私は複数の入力を持っているので、私は2つのマッパーを持っています。また、私は1つのコンバイナを持っています:なぜコンバイナ出力レコード= 0ですか?
class JoinCombiner extends MapReduceBase implements
Reducer<TextPair, Text, TextPair, Text> {
@Override
public void reduce(TextPair key, Iterator<Text> values,
OutputCollector<TextPair, Text> output, Reporter reporter)
throws IOException {
Text nodeId = new Text(values.next());
while (values.hasNext()) {
Text node = values.next();
TextPair outValue = new TextPair(nodeId.toString(), "0");
output.collect(outValue , node);
}
}
}
私はこのクラスをReducerとして使用します。しかし、私は、コンバイナとしてそれを使用している場合 - 私は、ログにこの情報を持っている:
Combine input records=6
Combine output records=0
Reduce input groups=0
Reduce shuffle bytes=30
Reduce input records=0
Reduce output records=0
ので、合成器から出力なし - >削減のための入力なし。私は理由を理解できない。 )あなたが考えを持っている場合、いくつかの説明をしてください) ありがとう
私が持っているものを見てください。これは仕事のための私の構成です: \t \t conf.setCombinerClass(JoinCombiner.class); \t \t conf.setReducerClass(JoinCombiner.class); \t \t \t \t conf.setNumReduceTasks(1); 58 \t \t地図出力がマテリアライズド= \t \t \t地図の入力レコード= 6つの \t \t地図出力レコード= 6 \t \t地図出力バイトバイト= 30 \t \t入力分割:そして、私は、ログに持って \t \t バイト= 1070 \t \t入力レコードの結合= 6 \t \t出力レコードの結合= 0 \t \tシャッフルバイトを削減= 0 \t \t入力グループを削減= 30 \t \t入力レコードを削減= 0 \t \tは= 0 – user3650408
出力レコードを削減あなたはコンバイナにキーを変更しているように見えます。私の更新された答えを見てください。 –
あなたはこのstackoverflowの投稿でコンバイナについてもっと興味深い事実を探すことができます:http://stackoverflow.com/questions/20212884/mapreduce-combiner –