atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ayub Khan Pathan <apat...@hortonworks.com>
Subject Re: Creating a new entity
Date Mon, 26 Dec 2016 14:36:11 GMT
Great! 

Regards
Ayub Khan

On 12/26/16, 6:29 PM, "Avi Levi" <avilevi3@gmail.com> wrote:

    I got it working - thanks !
    
    the reason for the timeout exception was the fact that the kafka
    topics used but atlas were missing
    
    thanks
    
    On Mon, Dec 26, 2016 at 1:35 PM, Avi Levi <avilevi3@gmail.com> wrote:
    > thanks! I'm over this step and encountered a new problem:
    >
    > I get a timeout exception against kafka:
    > kafka.common.errors.TimeoutException: Failed to update metadata after
    > 60000 ms.",
    >   "stackTrace": "org.apache.atlas.notification.NotificationException:
    > java.util.concurrent.ExecutionException:
    > org.apache.kafka.common.errors.TimeoutException: Failed to update
    > metadata after 60000 ms
    >
    > On Mon, Dec 26, 2016 at 12:33 PM, Ayub Khan Pathan
    > <apathan@hortonworks.com> wrote:
    >> I have just changed the qualifiedname and name values. Please check.
    >>      "qualifiedName": "default1@cluster1",
    >>      "name": "default1"
    >>
    >> Thanks
    >> Ayub Khan
    >>
    >> On 12/26/16, 3:51 PM, "Avi Levi" <avilevi3@gmail.com> wrote:
    >>
    >>     Thanks a lot
    >>
    >>     I can't see the difference between the json I've send and the one you
    >>     have, can you be more specific?
    >>     also, I try changing the id and keep getting the same response.
    >>
    >>     thanks again
    >>
    >>     On Sun, Dec 25, 2016 at 6:13 PM, Ayub Khan Pathan
    >>     <apathan@hortonworks.com> wrote:
    >>     > Hi,
    >>     >
    >>     >
    >>     >
    >>     > Seems like you are trying to create an existing entity, so Atlas is
    >>     > returning with no guid, which is expected.
    >>     >
    >>     >
    >>     >
    >>     > Below is the valid request/response json content for a successful creation
    >>     > of the entity.
    >>     >
    >>     > JSON request body sent to ATLAS:
    >>     >
    >>     > [{
    >>     >
    >>     >   "jsonClass":
    >>     > "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
    >>     >
    >>     >   "id": {
    >>     >
    >>     >     "jsonClass":
    >>     > "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
    >>     >
    >>     >     "id": "-1466683608564093000",
    >>     >
    >>     >     "version": 0,
    >>     >
    >>     >     "typeName": "DataSet",
    >>     >
    >>     >     "state": "ACTIVE"
    >>     >
    >>     >   },
    >>     >
    >>     >   "typeName": "DataSet",
    >>     >
    >>     >   "values": {
    >>     >
    >>     >     "qualifiedName": "default1@cluster1",
    >>     >
    >>     >     "name": "default1"
    >>     >
    >>     >   },
    >>     >
    >>     >   "traitNames": [],
    >>     >
    >>     >   "traits": {}
    >>     >
    >>     > }]
    >>     >
    >>     >
    >>     >
    >>     > JSON response from ATLAS:
    >>     >
    >>     > {
    >>     >
    >>     >   "requestId": "qtp1823101219-1336 - 70a0a4fb-3677-479a-bb76-ea74b20b8fd7",
    >>     >
    >>     >   "entities": {
    >>     >
    >>     >     "created": [
    >>     >
    >>     >       "fa35cf46-7f3a-4f51-b66a-31257991c5c5"
    >>     >
    >>     >     ]
    >>     >
    >>     >   },
    >>     >
    >>     >   "definition": {
    >>     >
    >>     >     "jsonClass":
    >>     > "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
    >>     >
    >>     >     "id": {
    >>     >
    >>     >       "jsonClass":
    >>     > "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
    >>     >
    >>     >       "id": "fa35cf46-7f3a-4f51-b66a-31257991c5c5",
    >>     >
    >>     >       "version": 0,
    >>     >
    >>     >       "typeName": "DataSet",
    >>     >
    >>     >       "state": "ACTIVE"
    >>     >
    >>     >     },
    >>     >
    >>     >     "typeName": "DataSet",
    >>     >
    >>     >     "values": {
    >>     >
    >>     >       "qualifiedName": "default1@cluster1",
    >>     >
    >>     >       "owner": null,
    >>     >
    >>     >       "description": null,
    >>     >
    >>     >       "name": "default1"
    >>     >
    >>     >     },
    >>     >
    >>     >     "traitNames": [],
    >>     >
    >>     >     "traits": {}
    >>     >
    >>     >   }
    >>     >
    >>     > }
    >>     >
    >>     >
    >>     >
    >>     > Hope this unblocks you.
    >>     >
    >>     >
    >>     >
    >>     > Thanks
    >>     >
    >>     > Ayub Khan
    >>     >
    >>     >
    >>     >
    >>     > On 12/25/16, 9:32 PM, "Avi Levi" <avilevi3@gmail.com> wrote:
    >>     >
    >>     >
    >>     >
    >>     >     Hi
    >>     >
    >>     >
    >>     >
    >>     >     I'm trying to create an entity, using the url:
    >>     >
    >>     >     admin:admin@sandbox.hortonworks.com:21000/api/atlas/entities
    >>     >
    >>     >
    >>     >
    >>     >     and the following body:
    >>     >
    >>     >     [{
    >>     >
    >>     >       "jsonClass":
    >>     > "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
    >>     >
    >>     >       "id": {
    >>     >
    >>     >         "jsonClass":
    >>     > "org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
    >>     >
    >>     >         "id": "-1466683608564093000",
    >>     >
    >>     >         "version": 0,
    >>     >
    >>     >         "typeName": "DataSet",
    >>     >
    >>     >         "state": "ACTIVE"
    >>     >
    >>     >       },
    >>     >
    >>     >       "typeName": "DataSet",
    >>     >
    >>     >       "values": {
    >>     >
    >>     >         "qualifiedName": "default@cluster1",
    >>     >
    >>     >         "name": "default"
    >>     >
    >>     >       },
    >>     >
    >>     >       "traitNames": [],
    >>     >
    >>     >       "traits": {}
    >>     >
    >>     >     }]
    >>     >
    >>     >
    >>     >
    >>     >
    >>     >
    >>     >     I get what seems to be a valid response, but without entity ids:
    >>     >
    >>     >
    >>     >
    >>     >     {
    >>     >
    >>     >       "requestId": "qtp1613255205-87 -
    >>     > 268121f0-fb70-43af-9898-7f05ac0c267d",
    >>     >
    >>     >       "entities": {}
    >>     >
    >>     >     }
    >>     >
    >>     >
    >>     >
    >>     >     Atlas's logs writes the following corresponding statements:
    >>     >
    >>     >
    >>     >
    >>     >     2016-12-25 12:12:55,860 INFO  - [qtp1613255205-87 -
    >>     >
    >>     >     268121f0-fb70-43af-9898-7f05ac0c267d:] ~ submitting entities
    >>     >
    >>     >
    >>     > {"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference","id":{"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id","id":"-1466683608564093000","version":0,"typeName":"DataSet","state":"ACTIVE"},"typeName":"DataSet","values":{"qualifiedName":"default@cluster1","description":"Default
    >>     >
    >>     >     dataset","name":"default"},"traitNames":[],"traits":{}}
    >>     >
    >>     >     (EntityResource:131)
    >>     >
    >>     >
    >>     >
    >>     >     2016-12-25 12:12:55,865 INFO  - [qtp1613255205-87 -
    >>     >
    >>     >     268121f0-fb70-43af-9898-7f05ac0c267d:] ~ graph commit
    >>     >
    >>     >     (GraphTransactionInterceptor:46)
    >>     >
    >>     >
    >>     >
    >>     >     2016-12-25 12:12:55,866 INFO  - [qtp1613255205-87 -
    >>     >
    >>     >     268121f0-fb70-43af-9898-7f05ac0c267d:] ~ Putting 0 events
    >>     >
    >>     >     (HBaseBasedAuditRepository:117)
    >>     >
    >>     >
    >>     >
    >>     >     2016-12-25 12:12:55,866 INFO  - [qtp1613255205-87 -
    >>     >
    >>     >     268121f0-fb70-43af-9898-7f05ac0c267d:] ~ Created entities []
    >>     >
    >>     >     (EntityResource:134)
    >>     >
    >>     >
    >>     >
    >>     >     as you can see, no errors or any clue as to whats wrong.
    >>     >
    >>     >
    >>     >
    >>     >     can someone point me in the right direction?
    >>     >
    >>     >     thanks a lot
    >>     >
    >>     >     Avi
    >>     >
    >>     >
    >>     >
    >>     >
    >>
    >>
    >>
    
    

Mime
View raw message