You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by mayank jain <ma...@freestoneinfotech.com> on 2019/07/04 14:19:08 UTC
Review Request 71012: [ATLAS-3310] - Relationships : After updating a
bigint attribute , any operation on relationship instance,
entity throws 500 internal server exception.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71012/
-----------------------------------------------------------
Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, and Sarath Subramanian.
Bugs: ATLAS-3310
https://issues.apache.org/jira/browse/ATLAS-3310
Repository: atlas
Description
-------
This patch will provide the fix to the BigInteger attributes in relationship.
Working on Unit test case for testing BigInteger case.
Diffs
-----
graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusElement.java a9cc5a6
Diff: https://reviews.apache.org/r/71012/diff/1/
Testing
-------
Modified the relationship attributes of hive_table and column with the below mentioned API :
link used: localhost:21000/api/atlas/v2/types/typedefs
Request Type : PUT
JSON :
{
"relationshipDefs": [
{
"category": "RELATIONSHIP",
"guid": "8339e074-8a76-4ab6-b716-2e6a5883c158",
"createdBy": "mayank",
"updatedBy": "mayank",
"createTime": 1561985660068,
"updateTime": 1561985660068,
"version": 1,
"name": "hive_table_columns",
"description": "hive_table_columns",
"typeVersion": "1.2",
"serviceType": "hive",
"attributeDefs": [
{
"name": "description",
"typeName": "string",
"isOptional": true,
"cardinality": "SINGLE",
"valuesMinCount": 0,
"valuesMaxCount": 1,
"isUnique": false,
"isIndexable": true,
"includeInNotification": false,
"description": "A sample attr for holdig ddescription type of attribute",
"searchWeight": -1
},
{
"name": "samplebigint",
"typeName": "biginteger",
"isOptional": true,
"cardinality": "SINGLE",
"valuesMinCount": 0,
"valuesMaxCount": 1,
"isUnique": false,
"isIndexable": true,
"includeInNotification": false,
"description": "A sample attr for holdig BigInteger type of data",
"searchWeight": -1
}
],
"relationshipCategory": "COMPOSITION",
"relationshipLabel": "__hive_table.columns",
"propagateTags": "NONE",
"endDef1": {
"type": "hive_table",
"name": "columns",
"isContainer": true,
"cardinality": "SET",
"isLegacyAttribute": true
},
"endDef2": {
"type": "hive_column",
"name": "table",
"isContainer": false,
"cardinality": "SINGLE",
"isLegacyAttribute": true
}
}
]
}
======================================================================================================
After this we can create a relationship between a hive table and a hive column using below mentioned API request
Now this request provides values for BigInteger Type and the values are been succesfully converted to respective types without misbehaving.
Link used : http://localhost:21000/api/atlas/v2/relationship
Request Type : POST
JSON :
{
"end1" :
{ "guid" : "4d5adf00-2c9b-4877-ad23-c41fd7319150" }
,
"end2" :
{ "guid" : "b0d889d1-008f-44ba-85cd-ab43abbb9a00" }
,
"typeName":"hive_table_columns",
"attributes" : {
"description" : "It is a very good description ",
"samplebigint" : 3218888888888888
}
}
======================================================================================================
Thanks,
mayank jain