Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Avro >> mail # user >> Does Avro GenericData.Record violate the .equals contract?


Copy link to this message
-
Re: Does Avro GenericData.Record violate the .equals contract?
On 02/09/2012 07:02 AM, Andrew Kenworthy wrote:
> This means that if I have no sorting defined in my schema, that all
> records are treated as being equal to one another.

If you specify "order":"ignore" for all fields in a record, then, yes,
all instances of that record would be equal.  I cannot imagine a case
where this would be useful, but I also don't see how this would violate
the equals() contract.

The default for fields is to behave as if "order":"ascending" is
specified.  Records are equal if all of their fields that are not
specified as "order":"ignore" are equal.

Doug
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB