我是用Avro编写Hadoop MapReduce的初学者,并且不清楚将String,CharSequence或Utf8对传递给map / reduce方法之间的区别是什么?
如果字符串仅仅是“ hello world”之类的东西怎么办?
例如,这是一个简单的映射方法,在这种情况下,使用CharSequence作为输出键类型:
public void map(Pairdatum, AvroCollector > collector, Reporter reporter) throws IOException { Integer number_one = new Integer(1); String output_key = "hello world"; collector.collect(new Pair (output_key, one)); }
任何帮助表示赞赏!