title: org.apache.avro.SchemaParseException: Can't redefine: org.apache.avro.reflect.Pair620b9c15f622a7
body: <p>I have a class as given below </p>
  
  <pre><code>class A
  {
  private   Map&lt;Long ,Set&lt;Long&gt;&gt; x;
  private   Map&lt;Long ,Set&lt;Long&gt;&gt; y;}
  </code></pre>
  
  <p>When avro tries to create schema using reflection it creates the schema having the name of the map as Pair620b9c15f622a7 for both the fields. ANd hence I get the exception</p>
  
  <pre><code>Schema s = ReflectData.get().getSchema(A.class);
  </code></pre>
  
  <p>I am not sure as of why I am getting this error , though the field names are completely different.</p>
  
  <p>1 solution for this might be to explicitly define the name of x and y in the schema using @AvroSchema annotation, but that is very manual task and I have to do it for all such mappings in my code</p>