From dev-return-27558-archive-asf-public=cust-asf.ponee.io@atlas.apache.org Thu Oct 25 06:34:11 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 B3F56180670 for ; Thu, 25 Oct 2018 06:34:10 +0200 (CEST) Received: (qmail 6422 invoked by uid 500); 25 Oct 2018 04:34:09 -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 6406 invoked by uid 99); 25 Oct 2018 04:34:08 -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, 25 Oct 2018 04:34:08 +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 7703A1A3119; Thu, 25 Oct 2018 04:34:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.9 X-Spam-Level: X-Spam-Status: No, score=0.9 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_MANYTO=0.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id XOVWG6j64NjN; Thu, 25 Oct 2018 04:34:07 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 5675C5F433; Thu, 25 Oct 2018 04:34:07 +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 F18C7E092E; Thu, 25 Oct 2018 04:34:06 +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 DF42AC40278; Thu, 25 Oct 2018 04:34:06 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3725191256072683313==" MIME-Version: 1.0 Subject: Review Request 69152: ATLAS-2934: utility to detect and repair incorrect entity state From: Madhan Neethiraj To: Ashutosh Mestry , keval bhatt , Abhishek Kadam , Apoorv Naik , Kapildeo Nayak , Nixon Rodrigues , Sarath Subramanian Cc: Madhan Neethiraj , atlas Date: Thu, 25 Oct 2018 04:34:06 -0000 Message-ID: <20181025043406.39451.51739@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/69152/ X-Sender: Madhan Neethiraj X-ReviewBoard-Diff-For: intg/src/main/java/org/apache/atlas/model/instance/AtlasCheckStateRequest.java X-ReviewBoard-Diff-For: repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityStateChecker.java X-ReviewBoard-Diff-For: intg/src/main/java/org/apache/atlas/model/instance/AtlasCheckStateResult.java Reply-To: Madhan Neethiraj X-ReviewRequest-Repository: atlas --===============3725191256072683313== 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/69152/ ----------------------------------------------------------- Review request for atlas, Abhishek Kadam, Apoorv Naik, Ashutosh Mestry, keval bhatt, Kapildeo Nayak, Nixon Rodrigues, and Sarath Subramanian. Bugs: ATLAS-2934 https://issues.apache.org/jira/browse/ATLAS-2934 Repository: atlas Description ------- This patch adds a REST API to scan specified entities for inconsistency of __traitNames property value and fix it. If the property value does not match the classification vertices associated with the entity, the value will be updated to reflect the associated vertices. Diffs ----- intg/src/main/java/org/apache/atlas/model/instance/AtlasCheckStateRequest.java PRE-CREATION intg/src/main/java/org/apache/atlas/model/instance/AtlasCheckStateResult.java PRE-CREATION repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasEntityStore.java e6f35fa1d repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityStoreV2.java bddbf71e6 repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java f03262faa repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityStateChecker.java PRE-CREATION webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java d9b1a412e webapp/src/test/java/org/apache/atlas/web/resources/AdminResourceTest.java 2dbc702e9 Diff: https://reviews.apache.org/r/69152/diff/1/ Testing ------- Verified that the new API detects and fixes __traitNames property, for the inconsistencies introduced. Here is a sample response from the call: { "state": "FIXED", "entitiesScanned": 19021, "entitiesFixed": 1, "entitiesNotFixed": 0, "entitiesOk": 19020, "entitiesPartiallyFixed": 0, "entities": { "e87a1236-eeb4-4474-8cfd-a82117b8d1cd": { "guid": "e87a1236-eeb4-4474-8cfd-a82117b8d1cd", "name": "testDb.testTable@myCluster", "state": "FIXED", "status": "ACTIVE", "typeName": "hive_table", "issues": [ "incorrect property: traitNames has missing classifications: [DATA_QUALITY]", "incorrect property: traitNames has unassigned classifications: [UNKNOWN_TAG2, UNKNOWN_TAG]" ] } } } Thanks, Madhan Neethiraj --===============3725191256072683313==--