From dev-return-16848-archive-asf-public=cust-asf.ponee.io@nifi.apache.org Wed Mar 28 15:07:45 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 DBC99180652 for ; Wed, 28 Mar 2018 15:07:44 +0200 (CEST) Received: (qmail 12268 invoked by uid 500); 28 Mar 2018 13:07:43 -0000 Mailing-List: contact dev-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 dev@nifi.apache.org Received: (qmail 12246 invoked by uid 99); 28 Mar 2018 13:07:43 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Mar 2018 13:07:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id AA58B180318 for ; Wed, 28 Mar 2018 13:07:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.129 X-Spam-Level: ** X-Spam-Status: No, score=2.129 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id cTaC3QT0dCHL for ; Wed, 28 Mar 2018 13:07:38 +0000 (UTC) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 591A85FB5B for ; Wed, 28 Mar 2018 13:07:37 +0000 (UTC) Received: by mail-lf0-f43.google.com with SMTP id z143-v6so3416531lff.3 for ; Wed, 28 Mar 2018 06:07:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=6PtUwu1kBsvmqURwPiN6DTW2R5NlhFvWq2OoxuMqBTs=; b=GdSrpFvrzC9dd1sfL5DTIqbfZxuoQh++MPyFJ6sN/LttNUehrw/DD5OVvAC0iWT+Mx AFFIZnKTVPIYAqhHcHUnBYRjcyEbVDUZiKjj9iYBT50QgKNbjBa3LB6zOIoOLDBd1A0I L7YiHeiQVsdDZM9s8NZtzX6KRTkJx8ssTS86Xm8tZJnb1sFaqmEZEYQiuwxhV2e4BaUm cQzWwqLuEsPDO4G2SEURbp1E+PqptI0Zm6xAyQk0JH/ksdzOepB6jS3zEmDcNRsxtgt/ WSDd7o/BvOhqOxEmka/ygfTPTfQzfIrFQyWMKNIeSkzn3Cr8dX2IRTBoCpK0bfG0u6Ia 7+4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=6PtUwu1kBsvmqURwPiN6DTW2R5NlhFvWq2OoxuMqBTs=; b=awDOwz6JBaTy64Xcm7t2EhNPf5aUogdOu4nkLAGpu7fi/j99xbK/CjA7h0s4QP5nkg Mi7AzEr4q8S/3FZ7mZkHPoyxTz/csjDHlpeFks+v5m6NWnZO17rAPZXXtA4MI8CDzBmd DMhndNqPGcAYfXiY7v27bFQHVe0yA9zgeCY2SUbVVdJ+HzP+iUaDZ22N0nCmEwJA9aYl Z0OOC5i3U6dHxCTNCDeHexvT+FkkHwCact4JwFoBN5uyzS4DRJeaLh8reTM78jf9wOo2 YBQZ8+lpxjLue5rabqAXOnQX67Ac7dYP5YU00h4qFZ1FDVZ8Stl033A1GxurFR2RETAU 2xtA== X-Gm-Message-State: AElRT7H8ZbKuhmuthVVmnQZA+ke7m0dLm2o6cw9ILxy1kt1FrvFFV993 +Wa8a/REzegmVVD5F7a5DqYubRO7tpJgcUTqpzb3XA== X-Google-Smtp-Source: AIpwx4+DreZorPZlrdjFtAw6O1eQ1FTBwpdSIhoVEs0skOgQUiGv/Z/QpqPR45jCWlC/076fPd7xCVoWiptNG+E4u+A= X-Received: by 2002:a19:519a:: with SMTP id g26-v6mr2315267lfl.50.1522242456582; Wed, 28 Mar 2018 06:07:36 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Sivaprasanna Date: Wed, 28 Mar 2018 13:07:26 +0000 Message-ID: Subject: Re: Read processor property in init() To: dev@nifi.apache.org Content-Type: multipart/alternative; boundary="000000000000e2fea9056878b0a8" --000000000000e2fea9056878b0a8 Content-Type: text/plain; charset="UTF-8" Just to add on top of what Mike said. The @OnScheduled annotation indicates that the method that is marked with this annotation will run when a processor is started every time. So basically the setup() will be called and executed everytime the processor is started from the UI. On Wed, 28 Mar 2018 at 6:34 PM, Jeff Zemerick wrote: > I will give that a go. Thanks for the quick answer, Mike! > > On Wed, Mar 28, 2018 at 9:01 AM, Mike Thomsen > wrote: > > Just do... > > > > @OnScheduled > > public void setup(ProcessContext context) { > > //Read properties and do setup. > > } > > > > On Wed, Mar 28, 2018 at 8:57 AM, Jeff Zemerick > wrote: > > > >> Hi everyone, > >> > >> Is there a recommended method for making user-configurable property > >> values available to a processor's init()? I would like to load a large > >> index file but allow the user to specify the index's path. I am > >> guessing that init() is executed too early to read user properties. > >> > >> Thanks for any suggestions. > >> > >> Jeff > >> > --000000000000e2fea9056878b0a8--