atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ayub Khan (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ATLAS-1610) Created entity guid order in response seems to be changed.
Date Wed, 01 Mar 2017 12:26:45 GMT
Ayub Khan created ATLAS-1610:
--------------------------------

             Summary: Created entity guid order in response seems to be changed.
                 Key: ATLAS-1610
                 URL: https://issues.apache.org/jira/browse/ATLAS-1610
             Project: Atlas
          Issue Type: Bug
          Components:  atlas-core
    Affects Versions: trunk, 0.8-incubating
            Reporter: Ayub Khan
            Priority: Blocker
             Fix For: trunk, 0.8-incubating


Steps to repro:
1. create below entity with two reference entities in it using /entities POST rest call
{noformat}
{
  "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
  "id":{
    "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
    "id":"-16989787630260306",
    "version":0,
    "typeName":"ComplexEntityTestTable9u3zoazpsj",
    "state":"ACTIVE"
  },
  "typeName":"ComplexEntityTestTable9u3zoazpsj",
  "values":{
    "columns":[
      {
        "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
        "id":{
          "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
          "id":"-16989787630260309",
          "version":0,
          "typeName":"ComplexEntityTestColumn2iv0d87lrb",
          "state":"ACTIVE"
        },
        "typeName":"ComplexEntityTestColumn2iv0d87lrb",
        "values":{
          "name":"column14vqfo3ocvf13"
        },
        "traitNames":[

        ],
        "traits":{

        },
        "systemAttributes":{
          "createdBy":null,
          "modifiedBy":null,
          "createdTime":null,
          "modifiedTime":null
        }
      },
      {
      	        "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
        "id":{
          "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
          "id":"-16989787630260308",
          "version":0,
          "typeName":"ComplexEntityTestColumn2iv0d87lrb",
          "state":"ACTIVE"
        },
        "typeName":"ComplexEntityTestColumn2iv0d87lrb",
        "values":{
          "name":"column2dofzvezzh12123"
        },
        "traitNames":[

        ],
        "traits":{

        },
        "systemAttributes":{
          "createdBy":null,
          "modifiedBy":null,
          "createdTime":null,
          "modifiedTime":null
        }
      }
    ],
    "db":{
      "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
      "id":"bad8c2eb-050e-4dbc-b219-92a5fe850fef",
      "version":0,
      "typeName":"ComplexEntityTestDB2dnlau6arq",
      "state":"ACTIVE"
    },
    "name":"createComplexEntityTablebllw6t3u1x123"
  },
  "traitNames":[

  ],
  "traits":{

  },
  "systemAttributes":{
    "createdBy":null,
    "modifiedBy":null,
    "createdTime":null,
    "modifiedTime":null
  }
}
{noformat}

2. Check the response for this POST request. Ideally first the reference entity GUID should
be present in entities.created[] array.
For example: 
IF table1 is created with col1 and col2 then the response object should contain entities.created["col1.GUID",
"col2.GUID",  "table1.GUID"] but the actual response contains in reverse order. *This breaks
the exisitng behavior and hence regression*
{noformat}
{
  "requestId": "pool-2-thread-10 - c79079a0-db10-4fa1-8eaa-b088993b23b0",
  "entities": {
    "created": [
      "6797d3c6-ee99-4d97-8fa8-b11d37fe4801",
      "9cc65c33-ab3a-4de3-8b27-3684b6580171",
      "9a29b72c-fb6a-4f54-b4fe-f306da87e383"
    ]
  },
  "definition": {
    "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
    "id": {
      "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
      "id": "6797d3c6-ee99-4d97-8fa8-b11d37fe4801",
      "version": 0,
      "typeName": "ComplexEntityTestTable9u3zoazpsj",
      "state": "ACTIVE"
    },
    "typeName": "ComplexEntityTestTable9u3zoazpsj",
    "values": {
      "columns": [
        {
          "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
          "id": {
            "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
            "id": "9cc65c33-ab3a-4de3-8b27-3684b6580171",
            "version": 0,
            "typeName": "ComplexEntityTestColumn2iv0d87lrb",
            "state": "ACTIVE"
          },
          "typeName": "ComplexEntityTestColumn2iv0d87lrb",
          "values": {
            "name": "column14vqfo3ocvf13"
          },
          "traitNames": [],
          "traits": {},
          "systemAttributes": {
            "createdBy": "admin",
            "modifiedBy": "admin",
            "createdTime": "2017-03-01T12:21:07.574Z",
            "modifiedTime": "2017-03-01T12:21:07.574Z"
          }
        },
        {
          "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
          "id": {
            "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
            "id": "9a29b72c-fb6a-4f54-b4fe-f306da87e383",
            "version": 0,
            "typeName": "ComplexEntityTestColumn2iv0d87lrb",
            "state": "ACTIVE"
          },
          "typeName": "ComplexEntityTestColumn2iv0d87lrb",
          "values": {
            "name": "column2dofzvezzh12123"
          },
          "traitNames": [],
          "traits": {},
          "systemAttributes": {
            "createdBy": "admin",
            "modifiedBy": "admin",
            "createdTime": "2017-03-01T12:21:07.574Z",
            "modifiedTime": "2017-03-01T12:21:07.574Z"
          }
        }
      ],
      "db": {
        "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
        "id": {
          "jsonClass": "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
          "id": "bad8c2eb-050e-4dbc-b219-92a5fe850fef",
          "version": 0,
          "typeName": "ComplexEntityTestDB2dnlau6arq",
          "state": "ACTIVE"
        },
        "typeName": "ComplexEntityTestDB2dnlau6arq",
        "values": {
          "name": "dbt85iotfchr"
        },
        "traitNames": [],
        "traits": {},
        "systemAttributes": {
          "createdBy": "admin",
          "modifiedBy": "admin",
          "createdTime": "2017-03-01T11:53:39.024Z",
          "modifiedTime": "2017-03-01T11:53:39.024Z"
        }
      },
      "name": "createComplexEntityTablebllw6t3u1x123"
    },
    "traitNames": [],
    "traits": {},
    "systemAttributes": {
      "createdBy": "admin",
      "modifiedBy": "admin",
      "createdTime": "2017-03-01T12:21:07.574Z",
      "modifiedTime": "2017-03-01T12:21:07.574Z"
    }
  },
  "guidAssignments": {
    "-16989787630260306": "6797d3c6-ee99-4d97-8fa8-b11d37fe4801",
    "-16989787630260309": "9cc65c33-ab3a-4de3-8b27-3684b6580171",
    "-16989787630260308": "9a29b72c-fb6a-4f54-b4fe-f306da87e383"
  }
}
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message