title: java.io.IOException: Invalid int encoding
body: <p>I'm writing a mapReduce Job to read and process an Avrofile.
  The input file is a Avro
  The output format is Avro</p>
  
  <p>When I'm executing the Mapreduce Job, I'm getting the following exception in the reducer phase. As the reducer throws the IOException, I'm not able to capture and subside it in the reducer. The error stack trace in Hue looks </p>
  
  <pre><code>java.io.IOException: Invalid int encoding
  at org.apache.avro.io.DirectBinaryDecoder.readInt(DirectBinaryDecoder.java:113)
  at org.apache.avro.io.ValidatingDecoder.readInt(ValidatingDecoder.java:83)
  at org.apache.avro.reflect.ReflectDatumReader.readInt(ReflectDatumReader.java:166)
  at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:156)
  at org.apache.avro.generic.GenericDatumReader.readRecord(GenericDatumReader.java:177)
  at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:148)
  at org.apache.avro.generic.GenericDatumReader.readArray(GenericDatumReader.java:206)
  at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:150)
  at org.apache.avro.generic.GenericDatumReader.readRecord(GenericDatumReader.java:177)
  at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:148)
  at org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:139)
  at org.apache.avro.hadoop.io.AvroDeserializer.deserialize(AvroDeserializer.
  </code></pre>
  
  <p>Upon googling, I noticed there was a apache JIRA ticket (<a href="https://issues.apache.org/jira/browse/AVRO-882">https://issues.apache.org/jira/browse/AVRO-882</a>). No updates. </p>
  
  <p>I'm using AVRO-1.7.5 and following is the dependency maven</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.apache.avro&lt;/groupId&gt;
          &lt;artifactId&gt;avro&lt;/artifactId&gt;
          &lt;version&gt;1.7.5&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>Any help would be much appreciated?. Thanks</p>