Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-9033

Define Validators and Default Values for NifiStatelessConnectors

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.15.0
    • Component/s: Extensions, NiFi Stateless
    • Labels:
      None

      Description

      Nifi Stateless Kafka Connectors' dataflow name config ("name") is colliding with Kafka Connector's base "name" config:
      https://github.com/apache/nifi/blob/6df07df3b2d2dbabeb279ac749ed45c37efd5d01/nifi-external/nifi-kafka-connect/nifi-kafka-connector/src/main/java/org/apache/nifi/kafka/connect/StatelessKafkaConnectorUtil.java#L99

      Kafka Connector base "name" config has a validator while the NifiConnector's "name" config doesn't, and this NifiConnector's validator (which is null) is overriding the Kafka Connector's "name" validator, therefore config validation gives a false positive.

      The DATAFLOW_NAME config definition should be changed to something like the following which includes a valid default value along with a correct validator.

              configDef.define(DATAFLOW_NAME, ConfigDef.Type.STRING, ConfigDef.NO_DEFAULT_VALUE, nonEmptyStringWithoutControlChars(), ConfigDef.Importance.HIGH, "The name of the dataflow.");

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                in-park In Park
                Reporter:
                in-park In Park
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h