Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Updating nifi xml template doesn't update nifi jobs in canvas

Updating nifi xml template doesn't update nifi jobs in canvas

I am trying to promote my Nifi Job from Dev to QA and For that I am using template. I know template doesn't store sensitive information (i.e. password and other info) and I am okay with it.

However, even if I change other values in XML and then upload the template it doesn't work.

Do I need to restart the nifi server? or so something else for tempalte to be reflected?

The only thing I want to change in this template is the Queue Name and Host Name. However if I change it in XML template and upload it it's not working.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.2">
    <description></description>
    <groupId>6893964f-0161-1000-c252-8edd203653e6</groupId>
    <name>template1</name>
    <snippet>
        <processGroups>
            <id>e0bb9818-49e5-3194-0000-000000000000</id>
            <parentGroupId>62dd8ddb-07e2-3459-0000-000000000000</parentGroupId>
            <position>
                <x>0.0</x>
                <y>0.0</y>
            </position>
            <comments></comments>
            <contents>
                <processors>
                    <id>a2cb42ea-5e05-362d-0000-000000000000</id>
                    <parentGroupId>e0bb9818-49e5-3194-0000-000000000000</parentGroupId>
                    <position>
                        <x>414.0</x>
                        <y>174.0</y>
                    </position>
                    <bundle>
                        <artifact>nifi-amqp-nar</artifact>
                        <group>org.apache.nifi</group>
                        <version>1.5.0</version>
                    </bundle>
                    <config>
                        <bulletinLevel>WARN</bulletinLevel>
                        <comments></comments>
                        <concurrentlySchedulableTaskCount>1</concurrentlySchedulableTaskCount>
                        <descriptors>
                            <entry>
                                <key>Queue</key>
                                <value>
                                    <name>Queue</name>
                                </value>
                            </entry>
                            <entry>
                                <key>Host Name</key>
                                <value>
                                    <name>Host Name</name>
                                </value>
                            </entry>
                            <entry>
                                <key>Port</key>
                                <value>
                                    <name>Port</name>
                                </value>
                            </entry>
                            <entry>
                                <key>Virtual Host</key>
                                <value>
                                    <name>Virtual Host</name>
                                </value>
                            </entry>
                            <entry>
                                <key>User Name</key>
                                <value>
                                    <name>User Name</name>
                                </value>
                            </entry>
                            <entry>
                                <key>Password</key>
                                <value>
                                    <name>Password</name>
                                </value>
                            </entry>
                            <entry>
                                <key>AMQP Version</key>
                                <value>
                                    <name>AMQP Version</name>
                                </value>
                            </entry>
                            <entry>
                                <key>ssl-context-service</key>
                                <value>
                                    <identifiesControllerService>org.apache.nifi.ssl.SSLContextService</identifiesControllerService>
                                    <name>ssl-context-service</name>
                                </value>
                            </entry>
                            <entry>
                                <key>cert-authentication</key>
                                <value>
                                    <name>cert-authentication</name>
                                </value>
                            </entry>
                            <entry>
                                <key>ssl-client-auth</key>
                                <value>
                                    <name>ssl-client-auth</name>
                                </value>
                            </entry>
                        </descriptors>
                        <executionNode>ALL</executionNode>
                        <lossTolerant>false</lossTolerant>
                        <penaltyDuration>30 sec</penaltyDuration>
                        <properties>
                            <entry>
                                <key>Queue</key>
                                <value>testq</value>
                            </entry>
                            <entry>
                                <key>Host Name</key>
                                <value>abcd.com</value>
                            </entry>
                            <entry>
                                <key>Port</key>
                                <value>5672</value>
                            </entry>
                            <entry>
                                <key>Virtual Host</key>
                            </entry>
                            <entry>
                                <key>User Name</key>
                                <value>gshah</value>
                            </entry>
                            <entry>
                                <key>Password</key>
                            </entry>
                            <entry>
                                <key>AMQP Version</key>
                                <value>0.9.1</value>
                            </entry>
                            <entry>
                                <key>ssl-context-service</key>
                            </entry>
                            <entry>
                                <key>cert-authentication</key>
                                <value>false</value>
                            </entry>
                            <entry>
                                <key>ssl-client-auth</key>
                                <value>REQUIRED</value>
                            </entry>
                        </properties>
                        <runDurationMillis>0</runDurationMillis>
                        <schedulingPeriod>0 sec</schedulingPeriod>
                        <schedulingStrategy>TIMER_DRIVEN</schedulingStrategy>
                        <yieldDuration>1 sec</yieldDuration>
                    </config>
                    <name>ConsumeAMQP</name>
                    <relationships>
                        <autoTerminate>false</autoTerminate>
                        <name>success</name>
                    </relationships>
                    <state>STOPPED</state>
                    <style/>
                    <type>org.apache.nifi.amqp.processors.ConsumeAMQP</type>
                </processors>
            </contents>
            <name>Consumer</name>
            <variables/>
        </processGroups>
    </snippet>
    <timestamp>02/05/2018 23:22:10 EST</timestamp>
</template>


1 REPLY 1
Highlighted

Re: Updating nifi xml template doesn't update nifi jobs in canvas

@Gaurang Shah Hello there. You will really want to take a look at HDF 3.1 that launched just before you sent this post. In it is the new Apache NiFi Registry which makes this case very easy and moves way beyond wrestling with templates.

Don't have an account?
Coming from Hortonworks? Activate your account here