Issue 13100

On restarting crawler for ebird, previously seen messages result in update instead of unchanged

13100
Reporter: omeyn
Assignee: omeyn
Type: Bug
Summary: On restarting crawler for ebird, previously seen messages result in update instead of unchanged
Description: Suspect the json is not identical so the hash is showing differing results. Expected behaviour is identical hashes resulting in unchanged.
Priority: Major
Resolution: Fixed
Status: Closed
Created: 2013-04-05 09:41:02.35
Updated: 2013-12-17 15:16:48.231
Resolved: 2013-04-08 15:36:18.795


Author: trobertson@gbif.org
Created: 2013-04-05 10:18:19.953
Updated: 2013-04-05 10:18:19.953
        
A wild guess here...

I may be wrong, but I think Jackson does not serialize in any consistent ordering.  If you are hashing the JSON as text, I would expect different hashes.
You can do something along these lines IIRC to force it:
  MAPPER.configure(SerializationConfig.Feature.SORT_PROPERTIES_ALPHABETICALLY, true);



    


Author: trobertson@gbif.org
Created: 2013-04-05 10:19:40.547
Updated: 2013-04-05 10:19:40.547
        
http://jackson.codehaus.org/1.9.4/javadoc/org/codehaus/jackson/map/SerializationConfig.Feature.html#SORT_PROPERTIES_ALPHABETICALLY

    


Author: omeyn@gbif.org
Comment: ordering now alphabetical in StarRecordSerializer (both internal map and jackson)
Created: 2013-04-08 15:36:18.836
Updated: 2013-04-08 15:36:18.836