Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E5888200CCA for ; Wed, 19 Jul 2017 17:11:51 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E3D6C169304; Wed, 19 Jul 2017 15:11:51 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0E612169301 for ; Wed, 19 Jul 2017 17:11:50 +0200 (CEST) Received: (qmail 91684 invoked by uid 500); 19 Jul 2017 15:11:49 -0000 Mailing-List: contact dev-help@atlas.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@atlas.apache.org Delivered-To: mailing list dev@atlas.apache.org Received: (qmail 91635 invoked by uid 99); 19 Jul 2017 15:11:49 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jul 2017 15:11:49 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id F0B4FC00D6; Wed, 19 Jul 2017 15:11:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3 X-Spam-Level: *** X-Spam-Status: No, score=3 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id fNs7AraKwEdi; Wed, 19 Jul 2017 15:11:46 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id E95E860F12; Wed, 19 Jul 2017 15:11:45 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 4DFCAE0069; Wed, 19 Jul 2017 15:11:45 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id 5D655C4002E; Wed, 19 Jul 2017 15:11:43 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3994284099703977006==" MIME-Version: 1.0 Subject: Re: Review Request 60938: [ATLAS-1959]: Enhance relationship attributes to support different cardinality mappings From: David Radley To: Madhan Neethiraj Cc: David Radley , atlas , Sarath Subramanian Date: Wed, 19 Jul 2017 15:11:43 -0000 Message-ID: <20170719151143.20503.94654@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: David Radley X-ReviewGroup: atlas X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/60938/ X-Sender: David Radley References: <20170718062548.11148.24597@reviews-vm2.apache.org> In-Reply-To: <20170718062548.11148.24597@reviews-vm2.apache.org> X-ReviewBoard-Diff-For: repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreHardDeleteV1Test.java X-ReviewBoard-Diff-For: repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreSoftDeleteV1Test.java X-ReviewBoard-Diff-For: intg/src/test/java/org/apache/atlas/TestRelationshipUtilsV2.java Reply-To: David Radley X-ReviewRequest-Repository: atlas archived-at: Wed, 19 Jul 2017 15:11:52 -0000 --===============3994284099703977006== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/60938/#review180926 ----------------------------------------------------------- addons/models/0010-base_model.json Line 105 (original), 105 (patched) I am not sunderstanding why some of these endpoints have the islegacyattribute on one end and some have it on both. It seems to be somehting to do with whetehr the relationships is composition or aggregation ; in that case the container end has the legacy flag. addons/models/0030-hive_model.json Line 554 (original), 554 (patched) why has this composition got the legacy flag on both ends ? Whereas otehr only have it one one . addons/models/0080-storm_model.json Line 150 (original), 150 (patched) shouldn't this be aggregation ? addons/models/0080-storm_model.json Line 158 (original), 158 (patched) do we need the isLagacyAttribute here? intg/src/main/java/org/apache/atlas/model/typedef/AtlasRelationshipEndDef.java Line 64 (original), 63 (patched) is is also I think we should document what we mean by a legacy attribute and how it behaves in different relationshionships. Also we should recommend here in the API docs when users should or should not set this flag and why. intg/src/main/java/org/apache/atlas/type/AtlasRelationshipType.java Line 99 (original), 103 (patched) I am not sure what this comment means. If we have the flag on both ends, we coudl generate the label using eitehr entity; there does not seem to be any code for this case. I suggest these cases need junits intg/src/main/java/org/apache/atlas/type/AtlasRelationshipType.java Line 230 (original), 259 (patched) same - I am not sure what this means repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java Lines 256 (patched) Does the API still allow creation of entities with constaints - how will this come through to thie code. - David Radley On July 18, 2017, 6:25 a.m., Sarath Subramanian wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/60938/ > ----------------------------------------------------------- > > (Updated July 18, 2017, 6:25 a.m.) > > > Review request for atlas and Madhan Neethiraj. > > > Bugs: ATLAS-1959 > https://issues.apache.org/jira/browse/ATLAS-1959 > > > Repository: atlas > > > Description > ------- > > * Improve relationship model to support create/update operations and the following cardinalities (previously supported using inverseReference): > 1 to 1 > 1 to many > many to 1 > many to many > > > * Change legacyLabel flag in AtlasRelationshipEndDef to boolean flag. > * Add unit tests for the above cases. > > > Diffs > ----- > > addons/models/0010-base_model.json 303f3796 > addons/models/0030-hive_model.json a795f0f3 > addons/models/0050-falcon_model.json 7755fa86 > addons/models/0060-hbase_model.json 1d264df4 > addons/models/0080-storm_model.json 25360ff0 > intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java 68da6af1 > intg/src/main/java/org/apache/atlas/model/instance/AtlasRelationship.java 2de9bdf0 > intg/src/main/java/org/apache/atlas/model/typedef/AtlasRelationshipDef.java fc820d49 > intg/src/main/java/org/apache/atlas/model/typedef/AtlasRelationshipEndDef.java f80ea895 > intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java e94dd190 > intg/src/main/java/org/apache/atlas/type/AtlasRelationshipType.java 841b66f7 > intg/src/main/java/org/apache/atlas/type/AtlasStructType.java f97d7674 > intg/src/test/java/org/apache/atlas/TestRelationshipUtilsV2.java PRE-CREATION > intg/src/test/java/org/apache/atlas/TestUtilsV2.java 9774583d > repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java 6f6d74bc > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityGraphDiscoveryV1.java 12e8bb1f > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasGraphUtilsV1.java cd9a47ad > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java 3ff6fbef > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java d4fdc257 > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 157f8cd2 > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java f4257be7 > repository/src/test/java/org/apache/atlas/repository/impexp/ImportServiceTest.java de8e7ef3 > repository/src/test/java/org/apache/atlas/repository/impexp/ZipFileResourceTestUtils.java d9017319 > repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreHardDeleteV1Test.java PRE-CREATION > repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreSoftDeleteV1Test.java PRE-CREATION > repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1Test.java 67702231 > > > Diff: https://reviews.apache.org/r/60938/diff/2/ > > > Testing > ------- > > added unit test - AtlasRelationshipStoreV1Test > > mvn clean package - succeeded with no errors. > > > Thanks, > > Sarath Subramanian > > --===============3994284099703977006==--