-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/67302/
-----------------------------------------------------------
Review request for atlas, Madhan Neethiraj and Ruchi Solani.
Bugs: ATLAS-2717
https://issues.apache.org/jira/browse/ATLAS-2717
Repository: atlas
Description
-------
**Approach**
- Attributes of classification types are pre-processed (before incoming types
are processed).
- New _STRUCT_ types are created with the classification name prefixed with
_legacy_. So, classification of the name PII is used to create a _STRUCT_ type
named _legacy_PII_.
- Entity definitions are updated to reference these newly created types.
- During edge processing, the type name of the in vertex is replaced with this
new type.
- Rest of the processing continues as is.
Diffs
-----
graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraph.java
e5316d80a
graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraph.java
b4d6b33ea
graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraphDatabase.java
c9d6067db
graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/migration/ElementProcessors.java
f51080a61
graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/migration/TypesDefScrubber.java
PRE-CREATION
graphdb/janus/src/test/java/org/apache/atlas/repository/graphdb/janus/migration/BaseUtils.java
aee1b698c
graphdb/janus/src/test/java/org/apache/atlas/repository/graphdb/janus/migration/GraphSONUtilityTest.java
049fd6418
graphdb/janus/src/test/resources/entity-with-trait-type.json PRE-CREATION
repository/src/main/java/org/apache/atlas/repository/migration/DataMigrationService.java
081376ff5
repository/src/test/java/org/apache/atlas/repository/migration/TypesDefScrubberTest.java
PRE-CREATION
repository/src/test/java/org/apache/atlas/repository/migration/TypesWithClassificationTest.java
PRE-CREATION
repository/src/test/resources/classification_defs/atlas-migration-data.json
PRE-CREATION
repository/src/test/resources/classification_defs/atlas-migration-typesdef.json
PRE-CREATION
repository/src/test/resources/legacy-typesdef.json PRE-CREATION
Diff: https://reviews.apache.org/r/67302/diff/1/
Testing
-------
**Unit tests**
- Added tests to verify the new flow.
- Executed existing tests.
**Test data**
- In versions 2.5 onwards (post 2/13/2017) it is not possible to create
entities of such types. Entity creation API throws a validation error.
- The test data was thus hand-created.
- This data verifies the cases where attribute type is:
- Classification type
- Array of classification type.
- Map of classification type.
Thanks,
Ashutosh Mestry