atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Madhan Neethiraj (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (ATLAS-1895) Inconsistent population of createdBy and updatedBy
Date Thu, 27 Jul 2017 23:38:00 GMT

     [ https://issues.apache.org/jira/browse/ATLAS-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Madhan Neethiraj resolved ATLAS-1895.
-------------------------------------
    Resolution: Duplicate

This issue is addressed in the fix for ATLAS-1879.

> Inconsistent population of createdBy and updatedBy
> --------------------------------------------------
>
>                 Key: ATLAS-1895
>                 URL: https://issues.apache.org/jira/browse/ATLAS-1895
>             Project: Atlas
>          Issue Type: Bug
>          Components:  atlas-core
>    Affects Versions: 0.8-incubating
>            Reporter: Laura Ngo
>            Assignee: Péter Gergő Barna
>
> When I create types via v2 POSTs, createdBy and updatedBy are not automatically available
or populated - they are only populated when I specify values for them. But when I create entities
they are automatically populated with the user I logged into the REST API client I use. And
even if I specify a different user they are still populated with the logged in user.
> Entity
> POST http://127.0.0.1:21000/api/atlas/v2/entity
> {code}
> {
>   "entity": {
>     "typeName": "test_entity_7",
>     "createdBy": "admin",
>     "updatedBy": "admin",
>     "attributes": {
>       "description": "test decription",
>       "name": "test_entity_7_hw_admin",
>       "owner": "admin",
>       "qualifiedName": "test_entity_7_hw_admin@Sandbox",
>       "test_7_1": "attr1",
>       "test_7_2": "attr2"
>     },
>     "guid": -1
>   },
>   "referredEntities": {}
> }
> {code}
> GET http://127.0.0.1:21000/api/atlas/v2/entity/guid/ed9cf696-cd76-4814-a407-9fdb8d18da3c
> {code}
> {
> "referredEntities": {
> }
> ,
> "entity": {
> "typeName": "test_entity_7",
> "attributes": {
> "owner": "admin",
> "test_7_2": "attr2",
> "test_7_1": "attr1",
> "qualifiedName": "test_entity_7_hw_admin@Sandbox",
> "name": "test_entity_7_hw_admin",
> "description": "test decription"
> }
> ,
> "guid": "ed9cf696-cd76-4814-a407-9fdb8d18da3c",
> "status": "ACTIVE",
> "createdBy": "holger_gov",
> "updatedBy": "holger_gov",
> "createTime": 1498268595794,
> "updateTime": 1498268595794,
> "version": 0,
> "classifications": [],
> }
> }
> {code}
> Type with createdBy and updatedBy specified
> POST
> http://127.0.0.1:21000/api/atlas/v2/types/typedefs
> {code}
> {
>    "enumDefs":[],
>    "structDefs":[],
>    "classificationDefs":[],
>    "entityDefs":[
>       {
>          "superTypes":[
>            "DataSet"
>          ],
>          "name":"test_entity_12",
>          "description":"test_entity_12",
>          "createdBy": "Laura",
>          "updatedBy": "Laura",
>          "attributeDefs":[
>             {
>                "name":"test_12_1",
>                "isOptional":true,
>                "isUnique":true,
>                "isIndexable":false,
>                "typeName":"string",
>                "valuesMaxCount":1,
>                "cardinality":"SINGLE",
>                "valuesMinCount":0
>             },
>            {
>                "name":"test_12_2",
>                "isOptional":true,
>                "isUnique":false,
>                "isIndexable":false,
>                "typeName":"string",
>                "valuesMaxCount":1,
>                "cardinality":"SINGLE",
>                "valuesMinCount":0
>             }
>          ]
>          
>       }
>    ]
> }
> {code}
> GET http://127.0.0.1:21000/api/atlas/v2/types/typedef/name/test_entity_12
> {code}
> {
> "category": "ENTITY",
> "guid": "12d8633f-e00f-426b-b445-cc1ecd800764",
> "createdBy": "Laura",
> "updatedBy": "Laura",
> "createTime": 1498283827058,
> "updateTime": 1498283827058,
> "version": 1,
> "name": "test_entity_12",
> "description": "test_entity_12",
> "typeVersion": "1.0",
> "attributeDefs": [
>   {
> "name": "test_12_1",
> "typeName": "string",
> "isOptional": true,
> "cardinality": "SINGLE",
> "valuesMinCount": 0,
> "valuesMaxCount": 1,
> "isUnique": true,
> "isIndexable": false
> },
>   {
> "name": "test_12_2",
> "typeName": "string",
> "isOptional": true,
> "cardinality": "SINGLE",
> "valuesMinCount": 0,
> "valuesMaxCount": 1,
> "isUnique": false,
> "isIndexable": false
> }
> ],
> "superTypes": [
>   "DataSet"
> ],
> }
> {code}
> Type without createdBy and updatedBy specified:
> POST http://127.0.0.1:21000/api/atlas/v2/types/typedefs
> {code}
> {
>    "enumDefs":[],
>    "structDefs":[],
>    "classificationDefs":[],
>    "entityDefs":[
>       {
>          "superTypes":[
>            "DataSet"
>          ],
>          "name":"test_entity_13",
>          "description":"test_entity_13",
>          "attributeDefs":[
>             {
>                "name":"test_13_1",
>                "isOptional":true,
>                "isUnique":true,
>                "isIndexable":false,
>                "typeName":"string",
>                "valuesMaxCount":1,
>                "cardinality":"SINGLE",
>                "valuesMinCount":0
>             },
>            {
>                "name":"test_13_2",
>                "isOptional":true,
>                "isUnique":false,
>                "isIndexable":false,
>                "typeName":"string",
>                "valuesMaxCount":1,
>                "cardinality":"SINGLE",
>                "valuesMinCount":0
>             }
>          ]
>          
>       }
>    ]
> }
> {code}
> GET http://127.0.0.1:21000/api/atlas/v2/types/typedef/name/test_entity_13
> {code}
> {
> "category": "ENTITY",
> "guid": "64455de7-7387-4c0d-96b1-7c373e7fc876",
> "createTime": 1498284103015,
> "updateTime": 1498284103015,
> "version": 1,
> "name": "test_entity_13",
> "description": "test_entity_13",
> "typeVersion": "1.0",
> "attributeDefs": [
>   {
> "name": "test_13_1",
> "typeName": "string",
> "isOptional": true,
> "cardinality": "SINGLE",
> "valuesMinCount": 0,
> "valuesMaxCount": 1,
> "isUnique": true,
> "isIndexable": false
> },
>   {
> "name": "test_13_2",
> "typeName": "string",
> "isOptional": true,
> "cardinality": "SINGLE",
> "valuesMinCount": 0,
> "valuesMaxCount": 1,
> "isUnique": false,
> "isIndexable": false
> }
> ],
> "superTypes": [
>   "DataSet"
> ],
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message