title: How to access data from a HashMap that is a Text type?
body: <p>I've encountered a minor issue:</p>
  
  <p>I have A Method that add values to  HashMap as follow:</p>
  
  <pre><code>Map&lt;Text,Text&gt; kv =new HashMap&lt;Text,Text&gt;();
  kv.put(new Text(0),new Text(0));
  kv.put(new Text(1),new Text(1));
  </code></pre>
  
  <p>PS: Text is a type from MapReduce framework.</p>
  
  <p>When I try to access the data as follow from MapReduce job:</p>
  
  <pre><code>    for (java.util.Map.Entry&lt;Text, Text&gt; entry : result.entrySet()) {
          System.out.println( entry.getKey() + ","+ entry.getValue());
      }
  </code></pre>
  
  <p>I was getting results as follow:</p>
  
  <pre><code>1,1
  1,1
  </code></pre>
  
  <p>But When I tried the same thing in standard Java, I was getting the result as expected:</p>
  
  <pre><code>0,0
  1,1
  </code></pre>
  
  <p>Is there any explanation to this?</p>