aperepel / nifi-api-deploy

Demonstrates NiFi template deployment and configuration via a REST API
Apache License 2.0
68 stars 37 forks source link

TemplateInspector misinterprets some GUIDs as Controller Services #18

Open davetorok opened 8 years ago

davetorok commented 8 years ago

TemplateInspector regex line 89 is finding some GUIDs (e.g. the "Client Name" and "Group ID" in my GetKafka processors) and mis-interpreting them as Controller Service GUIDs

Caught: java.lang.AssertionError: Couldn't resolve a Controller Service with ID:
20a22f28-7a5c-404f-af78-da3e5ded07b7. Expression: n.isEmpty()
java.lang.AssertionError: Couldn't resolve a Controller Service with ID: 20a22f2
8-7a5c-404f-af78-da3e5ded07b7. Expression: n.isEmpty()
aperepel commented 8 years ago

@davetorok I can't reproduce locally here. Can you tell me more about which properties you set in GetKafka? Which ones are different from defaults? Have you modified the Client Name and Group ID?

davetorok commented 8 years ago

pretty sure it was unmodified GetKafka with a genrated Client Name / Group ID [not modified]

aperepel commented 8 years ago

Dave, I can't reproduce here, can reliably redeploy, and even added a DB connection pool service in the template. See my yaml and template files below. Maybe you could share your template with me? Can send a private message if you want. Make sure to test with the latest version of this script. Thanks!

nifi:
  templateUri: file:github18.xml
  templateName: github18
  undeploy:
    templates:
      - github18
    controllerServices:
      - DBCPConnectionPool
    processGroups:
      - template-auto

controllerServices:
  DBCPConnectionPool:
    state: DISABLED
    config: {
      }
processGroups:
  template-auto:
    processors:
      GetKafka:
        config:
          ZooKeeper Connection String: lake01:2181
          Topic Name: thetopic
      ExecuteSQL:
        config:
          Database Connection Pooling Service: ${DBCPConnectionPool}
      /dev/null:
        config: {
          }

github18.xml.zip

davetorok commented 8 years ago

as demonstrated.... GetKafka with default ids if ("NiFi-asdf123-12382-334zjbkj") fail with TemplateInspector. Regex fix was changing to ^....$