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 12825200CCB for ; Thu, 20 Jul 2017 15:31:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1111E16B534; Thu, 20 Jul 2017 13:31:06 +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 572ED16B533 for ; Thu, 20 Jul 2017 15:31:05 +0200 (CEST) Received: (qmail 96784 invoked by uid 500); 20 Jul 2017 13:31:04 -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 96773 invoked by uid 99); 20 Jul 2017 13:31:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jul 2017 13:31:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 0993AC34B6 for ; Thu, 20 Jul 2017 13:31:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Pj7SOtMtmpD5 for ; Thu, 20 Jul 2017 13:31:02 +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 9E2D05F6C8 for ; Thu, 20 Jul 2017 13:31:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D3CDFE0DFC for ; Thu, 20 Jul 2017 13:31:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3055221ECD for ; Thu, 20 Jul 2017 13:31:00 +0000 (UTC) Date: Thu, 20 Jul 2017 13:31:00 +0000 (UTC) From: "Sharmadha Sainath (JIRA)" To: dev@atlas.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (ATLAS-1970) Export/Import - When updateTypeDefinition set to false , new types are not imported MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 20 Jul 2017 13:31:06 -0000 [ https://issues.apache.org/jira/browse/ATLAS-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16094679#comment-16094679 ] Sharmadha Sainath edited comment on ATLAS-1970 at 7/20/17 1:30 PM: ------------------------------------------------------------------- Added a patch with fix to allow creation of types even when updateTypeDefinition is set to false. As there can be many types in the exported zip file ( which may / may not be present in the backup cluster ) , it would be a little overhead to check if type is already present and update if present. Also , updateTypeDefinition's default value is true. So , if updateTypeDefinition is set to true or not set at all , Atlas would still go ahead and create/update the types. Please let me know/re-assign if there is be a better way of fixing this. Tested the patch with following : 1. updateTypeDefinition set to false 2. updateTypeDefinition set to true 3. updateTypeDefinition is not specified 4. updateTypeDefinition with true/false with other options such as transforms CC : [~ashutoshm] [~madhan@apache.org] was (Author: ssainath): Added a patch with fix to allow creation of types even when updateTypeDefinition is set to false. As there can be many types in the exported zip file ( which may / may not be present in the backup cluster ) , it would be a little overhead to check if type is already present and update if present. Also , updateTypeDefinition's default value is true. So , if updateTypeDefinition is set to true or not set at all , Atlas would still go ahead and create/update the types. Please let me know/re-assign if there could be a better way of fixing this. Tested the patch with following : 1. updateTypeDefinition set to false 2. updateTypeDefinition set to true 3. updateTypeDefinition is not specified 4. updateTypeDefinition with true/false with other options such as transforms > Export/Import - When updateTypeDefinition set to false , new types are not imported > ----------------------------------------------------------------------------------- > > Key: ATLAS-1970 > URL: https://issues.apache.org/jira/browse/ATLAS-1970 > Project: Atlas > Issue Type: Bug > Components: atlas-core > Affects Versions: 0.9-incubating, 0.8.1-incubating > Reporter: Sharmadha Sainath > Assignee: Sharmadha Sainath > Priority: Critical > Attachments: ATLAS-1970.patch, ImportFailureDueToUnknownType.txt > > > Import has option "updateTypeDefinition" which is used to update the type definitions in the backup cluster (cluster on which import is done) when the value is set to true. (Default is set to true). When its value is set to false , types in backup cluster are not updated with types present in exported zip file. > This works fine when , say a type type1 is present in both clusters , an entity of type type1 is exported and imported into backup cluster with updateTypeDefinition is set to false - Import is done successfully and type is not updated. > When the zip file contains type5 *which is not present in backup cluster* and the when import is fired , import fails with following exception: > {code} > {"errorCode":"ATLAS-500-00-001","errorMessage":"org.apache.atlas.exception.AtlasBaseException: Type ENTITY with name type5 does not exist"} > {code} > Attached the complete exception stack trace found in backup cluster's application logs. -- This message was sent by Atlassian JIRA (v6.4.14#64029)