---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72046/
---
(Updated Jan. 28, 2020, 10:44 a.m.)
Review request for atlas, Ashutosh Mestry, Madhan Neethiraj, Nixon Rodrigues,
and Sarath Subramanian.
Changes
---
Removed validateNamespaceAttributes() method call at the time of Entity
creation and updation (AtlasEntityGraphDiscoveryV2)
Other code refactoring.
Bugs: ATLAS-3534
https://issues.apache.org/jira/browse/ATLAS-3534
Repository: atlas
Description
---
Created separate endpoints to associate Namespace attributes to entity
Diffs (updated)
-
common/src/main/java/org/apache/atlas/repository/Constants.java 0b28243
intg/src/main/java/org/apache/atlas/AtlasErrorCode.java 2054513
intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java 1b033b9
intg/src/main/java/org/apache/atlas/type/AtlasNamespaceType.java a141d4a
repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
5ab9f4d
repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasEntityStore.java
928c70d
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityGraphDiscoveryV2.java
d3d9367
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java
25284e9
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
e427a59
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
dc4c399
webapp/src/main/java/org/apache/atlas/web/rest/EntityREST.java 6845121
Diff: https://reviews.apache.org/r/72046/diff/4/
Changes: https://reviews.apache.org/r/72046/diff/3-4/
Testing
---
Basic testing is done.
Create NamespaceDef sports:
curl --location --request POST
'http://localhost:21000/api/atlas/v2/types/typedefs' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
--data-raw '{
"namespaceDefs": [
{
"name": "sports",
"description": "Sample sports",
"serviceType": "NAMESPACES",
"typeVersion": "1.0",
"attributeDefs": [
{
"name": "sports_name",
"typeName": "string",
"options": {
"applicableEntityTypes": "[\"hdfs_path\",
\"hive_table\"]",
"maxStrLength": "50"
},
"cardinality": "SINGLE",
"isIndexable": true,
"isOptional": true,
"includeInNotification": true,
"isUnique": false
},
{
"name": "no_of_players",
"typeName": "int",
"options": {
"applicableEntityTypes": "[\"hdfs_path\",
\"hive_column\"]"
},
"cardinality": "SINGLE",
"isIndexable": true,
"isOptional": true,
"includeInNotification": true,
"isUnique": false
}
]
}
]
}'
Create NamespaceDef vehicle:
curl --location --request POST
'http://localhost:21000/api/atlas/v2/types/typedefs' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
--data-raw '{
"namespaceDefs": [
{
"name": "vehicle",
"description": "Sample vehicle",
"serviceType": "NAMESPACES",
"typeVersion": "1.0",
"attributeDefs": [
{
"name": "vehicle_name",
"typeName": "string",
"options": {
"applicableEntityTypes": "[\"hdfs_path\",
\"hive_table\"]",
"maxStrLength": "50"
},
"cardinality": "SINGLE",
"isIndexable": true,
"isOptional": true,
"includeInNotification": true,
"isUnique": false
},
{
"name": "no_of_wheels",
"typeName": "int",
"options": {
"applicableEntityTypes": "[\"hdfs_path\",
\"hive_column\"]"
},
"cardinality": "SINGLE",
"isIndexable": true,
"isOptional": true,
"includeInNotification": true,
"isUnique": false
}
]
}
]
}'
Create hdfs_path entity:
curl --location --request POST 'http://localhost:21000/api/atlas/v2/entity' \
--header 'Content-Type: application/json' \
--header 'Authorization: