私はApache Hadoopを学んでおり、WordCountの例org.apache.hadoop.examples.WordCountを見ていました。この例は理解できましたが、変数LongWritable キーが使用されていないことがわかります
(...)
public void map(LongWritable key, Text value,
OutputCollector<Text, IntWritable> output,
Reporter reporter) throws IOException {
String line = value.toString();
StringTokenizer itr = new StringTokenizer(line);
while (itr.hasMoreTokens()) {
word.set(itr.nextToken());
output.collect(word, one);
}
}
(...)
この変数の用途は何ですか? 誰かがそれが使用される簡単な例を教えてもらえますか? ありがとう