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 8F34C200B25 for ; Wed, 8 Jun 2016 17:50:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8C6A2160A35; Wed, 8 Jun 2016 15:50:22 +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 D6283160A0E for ; Wed, 8 Jun 2016 17:50:21 +0200 (CEST) Received: (qmail 5486 invoked by uid 500); 8 Jun 2016 15:50:21 -0000 Mailing-List: contact commits-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list commits@nifi.apache.org Received: (qmail 5467 invoked by uid 99); 8 Jun 2016 15:50:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jun 2016 15:50:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id F00552C14F8 for ; Wed, 8 Jun 2016 15:50:20 +0000 (UTC) Date: Wed, 8 Jun 2016 15:50:20 +0000 (UTC) From: "Oleg Zhurakousky (JIRA)" To: commits@nifi.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (NIFI-826) Export templates in a deterministic way MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 08 Jun 2016 15:50:22 -0000 [ https://issues.apache.org/jira/browse/NIFI-826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15320786#comment-15320786 ] Oleg Zhurakousky commented on NIFI-826: --------------------------------------- Just continuing with some relevant notes: After initial prototyping the _inceptionId_ approach seem to work, although I don't like the fact that we must have _public void setInceptionId(String inceptionId)_ to make JAXB to work. Basically it's needed for de-serialization purposes but I want to make sure that it is not called by anyone/anything else, so the workaround I am experimenting with now is something like this: {code} StackTraceElement element = Thread.currentThread().getStackTrace()[2]; if (element.getClassName().endsWith("getInceptionId_setInceptionId_java_lang_String")) { this.inceptionId = UUID.fromString(inceptionId); } else { throw new RuntimeException("Setting inception id is not allowed since it is generated and immutable."); } {code} Basically, analyze the stack trace and see if it's called by the appropriate component (JAXB in this case) > Export templates in a deterministic way > --------------------------------------- > > Key: NIFI-826 > URL: https://issues.apache.org/jira/browse/NIFI-826 > Project: Apache NiFi > Issue Type: Improvement > Components: Core Framework > Reporter: Matt Gilman > Assignee: Oleg Zhurakousky > Fix For: 1.0.0 > > > Templates should be exported in a deterministic way so that they can be compared or diff'ed with another. Items to consider... > - The ordering of components > - The id's used to identify the components > - Consider excluding irrelevant items. When components are imported some settings are ignored (run state). -- This message was sent by Atlassian JIRA (v6.3.4#6332)