From dev-return-22830-archive-asf-public=cust-asf.ponee.io@atlas.apache.org Thu Apr 26 05:30:40 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id ECC20180676 for ; Thu, 26 Apr 2018 05:30:39 +0200 (CEST) Received: (qmail 86191 invoked by uid 500); 26 Apr 2018 03:30:38 -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 86176 invoked by uid 99); 26 Apr 2018 03:30:37 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Apr 2018 03:30:37 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 845901A25D7; Thu, 26 Apr 2018 03:30:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.69 X-Spam-Level: X-Spam-Status: No, score=0.69 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id hbYEodbTaz68; Thu, 26 Apr 2018 03:30:35 +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 005135FAEB; Thu, 26 Apr 2018 03:30:35 +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 34819E0047; Thu, 26 Apr 2018 03:30:34 +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 EEE0CC405C8; Thu, 26 Apr 2018 03:30:33 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============5966804714674250962==" MIME-Version: 1.0 Subject: Re: Review Request 66797: ATLAS-2609: Update audit listener to handle propagated classification add/delete/update From: Madhan Neethiraj To: Apoorv Naik , Madhan Neethiraj , Ashutosh Mestry Cc: atlas , Sarath Subramanian Date: Thu, 26 Apr 2018 03:30:33 -0000 Message-ID: <20180426033033.6151.88057@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Madhan Neethiraj X-ReviewGroup: atlas X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/66797/ X-Sender: Madhan Neethiraj X-ReviewBoard-ShipIt: 1 References: <20180425202939.3459.71395@reviews-vm2.apache.org> In-Reply-To: <20180425202939.3459.71395@reviews-vm2.apache.org> Reply-To: Madhan Neethiraj X-ReviewRequest-Repository: atlas --===============5966804714674250962== 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/66797/#review201979 ----------------------------------------------------------- Fix it, then Ship it! repository/src/main/java/org/apache/atlas/repository/audit/EntityAuditListenerV2.java Lines 148 (patched) Use of isPropagatedClassificationUpdated can be avoided by having #148 - #150 as 'else' block at line #146. repository/src/main/java/org/apache/atlas/repository/audit/EntityAuditListenerV2.java Line 138 (original), 164 (patched) Consider replacing "entity.getGuid().equals(classification.getEntityGuid())" with the following: StringUtils.equals(entity.getGuid(), classification.getEntityGuid()) repository/src/main/java/org/apache/atlas/repository/audit/EntityAuditListenerV2.java Lines 234 (patched) Consider replacing "equals()" with StringUtil.equals(). server-api/src/main/java/org/apache/atlas/RequestContextV1.java Lines 110 (patched) recordAddPropagation() ==> recordAddedPropagation() server-api/src/main/java/org/apache/atlas/RequestContextV1.java Lines 124 (patched) recordRemovePropagation() ==> recordRemovedPropagation() - Madhan Neethiraj On April 25, 2018, 8:29 p.m., Sarath Subramanian wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/66797/ > ----------------------------------------------------------- > > (Updated April 25, 2018, 8:29 p.m.) > > > Review request for atlas, Apoorv Naik, Ashutosh Mestry, and Madhan Neethiraj. > > > Bugs: ATLAS-2609 > https://issues.apache.org/jira/browse/ATLAS-2609 > > > Repository: atlas > > > Description > ------- > > Currently audit are not generated for propagated classification add/update or delete. > > For Audit: > * Adding Propagated Classification => Send 'Propagated Classifications Added' message to audit repository. > * Removing Propagated Classification => Send 'Propagated Classifications Deleted' message to audit repository. > * Updating Propagated Classification => Send 'Propagated Classifications Updated' message to audit repository. > > > Diffs > ----- > > client/client-v1/src/main/java/org/apache/atlas/EntityAuditEvent.java 3cf3e212 > dashboardv2/public/js/utils/Enums.js 8c0518bf > intg/src/main/java/org/apache/atlas/listener/EntityChangeListenerV2.java 70877d22 > intg/src/main/java/org/apache/atlas/model/audit/EntityAuditEventV2.java 1045c774 > repository/src/main/java/org/apache/atlas/repository/audit/AbstractStorageBasedAuditRepository.java af6c4e62 > repository/src/main/java/org/apache/atlas/repository/audit/EntityAuditListener.java 1c04eea4 > repository/src/main/java/org/apache/atlas/repository/audit/EntityAuditListenerV2.java bb510149 > repository/src/main/java/org/apache/atlas/repository/audit/HBaseBasedAuditRepository.java c5967b27 > repository/src/main/java/org/apache/atlas/repository/converters/AtlasInstanceConverter.java 20147a0c > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityChangeNotifier.java 9aebde2b > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1.java 51dcc3a5 > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/DeleteHandlerV1.java c0f2fc3d > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphMapper.java 4225a80d > repository/src/main/java/org/apache/atlas/repository/store/graph/v1/EntityGraphRetriever.java 7d5b7fb6 > repository/src/test/java/org/apache/atlas/repository/store/graph/v1/AtlasRelationshipStoreV1Test.java 8fc0327a > server-api/src/main/java/org/apache/atlas/RequestContextV1.java b7c56865 > server-api/src/main/java/org/apache/atlas/listener/EntityChangeListener.java 19fae4fd > tools/atlas-migration-exporter/src/main/java/org/apache/atlas/migration/NoOpNotificationChangeListener.java 6c2bf220 > webapp/src/main/java/org/apache/atlas/notification/EntityNotificationListenerV2.java ac097b60 > webapp/src/main/java/org/apache/atlas/notification/NotificationEntityChangeListener.java a3e5949c > > > Diff: https://reviews.apache.org/r/66797/diff/2/ > > > Testing > ------- > > Precommit validated: https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/307/console > > Validated audit/notifications manually for propagated classification add/update/delete > > > Thanks, > > Sarath Subramanian > > --===============5966804714674250962==--