atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Radley <>
Subject Fw: [jira] David Radley mentioned you (JIRA)
Date Wed, 18 Jan 2017 10:22:11 GMT
Hi Madhan,
I like the idea of using AtlasObjectId. Can I suggest that if we have a 
single hashcode of it in the serialized form , then we cannot easily see 
that a reference points to a particular object's guid. Maybe the Java API 
reference should serialise to a nested structure containing the type and 
guid. For readability / debugging I suggest we also add name into 
AtlasObjectId (this approach proved very useful in ATLAS-1186). In this 
way a reference contains the type and name (understandable by the human 
reader, but not unique) and the guid (not understandable by the human 
reader but useful for unique identification of objects and construction of 
unambiguous object references). 

So the children and parent references in json would look something like :

"children": [
                                     "type": "TestType2",
                                            "name": "child1",
                                            "guid":  “1234-5678-90123”
                                     "type": "TestType2",
                                            "name": "child2",
                                            "guid":  “1234-5678-90124”
                                     "type": "TestType1",
                                            "name": "parent1",
                                            "guid":  “1234-5678-90123”

We would need something equivalent in toString(). 

What do you think?

   Thanks, David. 
----- Forwarded by David Radley/UK/IBM on 18/01/2017 09:45 -----

From:   Madhan Neethiraj <>
To:     David Radley/UK/IBM@IBMGB
Date:   18/01/2017 01:47
Subject:        Re: [jira] David Radley mentioned you (JIRA)
Sent by:        Madhan Neethiraj <>


Thanks for the type-def JSONs and the steps to reproduce the issue. The 
implementation should be updated to not get into such infinite loops. I 
guess one approach would be to treat references to other entities as a 
AtlasObjectId, even when the reference points to a full entity. For 
- toString() should print AtlasObjectId equivalent of the referenced 
object. i.e. { “typeName”: “TestType1”, “guid”: “1234-5678-90123” }
- hashCode() should use (new AtlasObjectId(“TestType1”, 
“1234-5678-90123”)).hashCode(), instead of calling child.hashCode() or 

What do you think?


On 1/17/17, 7:11 AM, "David Radley (JIRA)" <> wrote:


    David Radley mentioned you on ATLAS-1458
    As requested on the dev list, here are json files defining the types 
that I used to recreate the loop.
    The types create ok. To ge the loop using the  01-test.json, I do the 
    create an entity of TestType1 EntityA
    create an entity of TestType2 EntityB
    I update EntityA to have EntityB as a child.
    I update EntityB to have EntityB as a parent. It loops during this 
    I get the same loop for 02-test.json and 03-test.json. 
    >                 Key: ATLAS-1458
    >         View Online:
    >         Add Comment:
    Hint: You can mention someone in an issue description or comment by 
typing  "@" in front of their username.
    This message was sent by Atlassian JIRA

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message