title: MapReduce with Avro in Java: String vs CharSequence vs Utf8 data types
body: <p>I'm a beginner in writing Hadoop MapReduce with Avro, and am unclear as to what the differences are between passing in to a map/reduce method a Pair with String, CharSequence, or Utf8?</p>
  
  <p>What if the string is just simply something like "hello world"?</p>
  
  <p>Here's a simple map method for example, in this case using CharSequence as the output key type:</p>
  
  <pre><code>public void map(Pair&lt;CharSequence, Integer&gt; datum, AvroCollector&lt;Pair&lt;CharSequence, Integer&gt;&gt; collector, Reporter reporter) throws IOException {
              Integer number_one = new Integer(1);
              String output_key = "hello world";
              collector.collect(new Pair&lt;CharSequence, Integer&gt;(output_key, one));
          }
  </code></pre>
  
  <p>Any help is appreciated!</p>