----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/68771/#review208777 -----------------------------------------------------------
intg/src/main/java/org/apache/atlas/entitytransform/Action.java Lines 39 (patched) <https://reviews.apache.org/r/68771/#comment292957> ADDCLASSIFICATION => ADD_CLASSIFICATION intg/src/main/java/org/apache/atlas/entitytransform/Action.java Lines 127 (patched) <https://reviews.apache.org/r/68771/#comment292960> ClassificationAction => AddClassificationAction intg/src/main/java/org/apache/atlas/entitytransform/AtlasEntityTransformer.java Line 33 (original), 36 (patched) <https://reviews.apache.org/r/68771/#comment292969> consider initializing context here so that it can be used across all actions/conditions. intg/src/main/java/org/apache/atlas/entitytransform/BaseEntityHandler.java Lines 234 (patched) <https://reviews.apache.org/r/68771/#comment292962> BaseEntityHandler.createEntityHandlers() => createEntityHandlers(); intg/src/main/java/org/apache/atlas/entitytransform/Condition.java Lines 194 (patched) <https://reviews.apache.org/r/68771/#comment292965> if conditionValue is a list of objectIds? This deserialization would fail. intg/src/main/java/org/apache/atlas/entitytransform/Condition.java Lines 213 (patched) <https://reviews.apache.org/r/68771/#comment292966> consider refactoring: AtlasObjectId objId = AtlasTypeUtil.getAtlasObjectId(entity) return objectId.equals(objId); intg/src/main/java/org/apache/atlas/entitytransform/Context.java Lines 25 (patched) <https://reviews.apache.org/r/68771/#comment292959> Context => TransformerContext repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java Line 139 (original), 138 (patched) <https://reviews.apache.org/r/68771/#comment292963> consider creating Context object before this call and passing context as a param and renaming fromJson to initializeHandlers(). for e.g. Context ctx = new Context(typeRegistry, typeDefStore, source.getExportResult().getRequest()); List<BaseEntityHandler> entityHandlers = BaseEntityHandler.initializeHandlers(transformersJson, ctx); - Sarath Subramanian On Sept. 19, 2018, 4:33 p.m., Ashutosh Mestry wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/68771/ > ----------------------------------------------------------- > > (Updated Sept. 19, 2018, 4:33 p.m.) > > > Review request for atlas, Madhan Neethiraj, Nixon Rodrigues, and Sarath > Subramanian. > > > Bugs: ATLAS-2882 > https://issues.apache.org/jira/browse/ATLAS-2882 > > > Repository: atlas > > > Description > ------- > > **Approach** > Described in JIRA. > > **CURL** > > _transform_ > [{\"conditions\":{\"__entity\":\"topLevel\"}, > \"action\":{\"__entity\":\"addClassification: replicated\"}}] > > _import-options.json_ update top-level entities: > { > "options": { > "transformers": ""[{\"conditions\":{\"__entity\":\"topLevel:\"}, > \"action\":{\"__entity\":\"addClassification: replicated\"}}]"", > "replicateFrom": "cl1" > } > } > > _import-options.json_ update all entities: > { > "options": { > "transformers": ""[{\"conditions\":{\"__entity\":\"all:\"}, > \"action\":{\"__entity\":\"addClassification: replicated\"}}]"", > "replicateFrom": "cl1" > } > } > > _import-options.json_ with multiple conditions: > { > "options": { > "transformers": "[{\"conditions\":{\"__entity\":\"all: \"}, > \"action\":{\"__entity\":\"addClassification: replicated\"}}, > {\"conditions\":{\"hive_db.clusterName\":\"EQUALS: > cl1\"},\"action\":{\"hive_db.clusterName\":\"SET: clx\"}}]", > "replicateFrom": "cl1" > } > } > > curl -g -X POST -u admin:admin -H "Content-Type: multipart/form-data" -H > "Cache-Control: no-cache" -F request=@../docs/import-options.json -F > data=@../docs/hr-detailed.zip "http://localhost:21000/api/atlas/admin/import" > > > Diffs > ----- > > intg/src/main/java/org/apache/atlas/entitytransform/Action.java ca5f3a8c8 > > intg/src/main/java/org/apache/atlas/entitytransform/AtlasEntityTransformer.java > c14f2fdde > intg/src/main/java/org/apache/atlas/entitytransform/BaseEntityHandler.java > c1f286933 > intg/src/main/java/org/apache/atlas/entitytransform/Condition.java > d44f57509 > intg/src/main/java/org/apache/atlas/entitytransform/Context.java > PRE-CREATION > intg/src/main/java/org/apache/atlas/entitytransform/NeedsContext.java > PRE-CREATION > > intg/src/test/java/org/apache/atlas/entitytransform/TransformationHandlerTest.java > 69fba1eaf > > repository/src/main/java/org/apache/atlas/repository/impexp/ImportService.java > a09385e08 > > repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java > b556fe9fd > > > Diff: https://reviews.apache.org/r/68771/diff/2/ > > > Testing > ------- > > **Unit tests** > > Additional tests. > > **Functional tests** > Via CURL calls. > > > Thanks, > > Ashutosh Mestry > >
