Return-Path: X-Original-To: apmail-atlas-dev-archive@minotaur.apache.org Delivered-To: apmail-atlas-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7A6661753C for ; Wed, 16 Sep 2015 06:45:06 +0000 (UTC) Received: (qmail 46205 invoked by uid 500); 16 Sep 2015 06:45:06 -0000 Delivered-To: apmail-atlas-dev-archive@atlas.apache.org Received: (qmail 46160 invoked by uid 500); 16 Sep 2015 06:45:06 -0000 Mailing-List: contact dev-help@atlas.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@atlas.incubator.apache.org Delivered-To: mailing list dev@atlas.incubator.apache.org Delivered-To: moderator for dev@atlas.incubator.apache.org Received: (qmail 21435 invoked by uid 99); 16 Sep 2015 06:32:35 -0000 X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.975 X-Spam-Level: *** X-Spam-Status: No, score=3.975 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=3, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.006] autolearn=disabled Content-Type: multipart/alternative; boundary="===============4459236116723041690==" MIME-Version: 1.0 Subject: Re: Review Request 38341: Provide Entity Change Notification From: "Shwetha GS" To: "John Speidel" , "Shwetha GS" Cc: "atlas" , "Tom Beerbower" Date: Wed, 16 Sep 2015 06:32:31 -0000 Message-ID: <20150916063231.9550.16053@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Shwetha GS" X-ReviewGroup: atlas X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/38341/ X-Sender: "Shwetha GS" References: <20150914125516.3774.88390@reviews.apache.org> In-Reply-To: <20150914125516.3774.88390@reviews.apache.org> Reply-To: "Shwetha GS" X-ReviewRequest-Repository: atlas --===============4459236116723041690== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit > On Sept. 14, 2015, 12:55 p.m., Shwetha GS wrote: > > notification/src/main/java/org/apache/atlas/notification/entity/Entity.java, line 25 > > > > > > Users are already exposed to the type system and its classes. Referenceable in this case. We can use that itself instead of adding another interface > > Tom Beerbower wrote: > It wasn’t clear to me that IReferenceableInstance was supposed to be end user facing. It looks like it’s heavily used internally. I think that having the notification Entity interface shields the notification users from any changes that we may need to make to the type system in the future. Also, it allows us to expose things in a different way if so required by the notification users. One example is the case where the Ranger guys want to see which values of a entity’s trait belong to the trait’s super types. You can’t get that through IReferenceableInstance and IStruct. It requires an additional call or calls to the type system to get the trait hierarchy. If we are trying to make the system easy to use, that’s additional work that we can do for them. IReferenceableInstance is internal to atlas. Referenceable is exposed to users. There is an API to get type definition if they want to know the hierarchy. I don't think they need to know which attribute belongs to which trait, we should discuss their usecase to check if they are using hierarchy correctly. If they really need it, its probably what even other users want, and we can add to Struct(instead of maintaining another interface) > On Sept. 14, 2015, 12:55 p.m., Shwetha GS wrote: > > repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java, line 469 > > > > > > Move to another file > > Tom Beerbower wrote: > Could you explain why? The listener implementation is internal to DefaultMetadataService. It's not ever intended to be used outside of this class. Listeners are not part of DefaultMetadataService, for example, I might have a cache which listens to enity changes and provides faster access to entities. Its not the responsibility of DefaultMetadataService and hence its a listener and not hard coded in DefaultMetadataService. Same goes with entity notification - Shwetha ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/38341/#review98834 ----------------------------------------------------------- On Sept. 14, 2015, 4:08 a.m., Tom Beerbower wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/38341/ > ----------------------------------------------------------- > > (Updated Sept. 14, 2015, 4:08 a.m.) > > > Review request for atlas, John Speidel and Shwetha GS. > > > Bugs: ATLAS-158 > https://issues.apache.org/jira/browse/ATLAS-158 > > > Repository: atlas > > > Description > ------- > > Add entity change notification to Atlas based using the existing atlas-notification module. > > First cut at a patch for the Atlas entity change notification. Note that at a minimum additional unit tests are required. I'm putting up the review to get some initial feedback. > > > Diffs > ----- > > notification/src/main/java/org/apache/atlas/notification/entity/Entity.java PRE-CREATION > notification/src/main/java/org/apache/atlas/notification/entity/EntityChangeConsumer.java PRE-CREATION > notification/src/main/java/org/apache/atlas/notification/entity/EntityChangeListener.java PRE-CREATION > notification/src/main/java/org/apache/atlas/notification/entity/EntityImpl.java PRE-CREATION > notification/src/main/java/org/apache/atlas/notification/entity/EntityNotification.java PRE-CREATION > notification/src/main/java/org/apache/atlas/notification/entity/Trait.java PRE-CREATION > notification/src/main/java/org/apache/atlas/notification/entity/TraitImpl.java PRE-CREATION > notification/src/test/java/org/apache/atlas/notification/entity/EntityImplTest.java PRE-CREATION > notification/src/test/java/org/apache/atlas/notification/entity/TraitImplTest.java PRE-CREATION > repository/pom.xml 8e4d0f3 > repository/src/main/java/org/apache/atlas/RepositoryMetadataModule.java fbd01de > repository/src/main/java/org/apache/atlas/listener/EntityChangeListener.java f58d6de > repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java 56168db > > Diff: https://reviews.apache.org/r/38341/diff/ > > > Testing > ------- > > mvn clean test > > All existing tests pass. > > New unit tests added (more required). > > > Thanks, > > Tom Beerbower > > --===============4459236116723041690==--