Support Questions

Find answers, ask questions, and share your expertise

How to inject Custom Confluent Schema Registry controller service?

avatar
Expert Contributor

Hello,

Since our downstream applications use Confluent Schema Registry, I implemented a custom ConfluentSchemaRegistry service by referring the HWXSchemaRegistry. I put the .nar file into NIFI_HOME/lib folder. I can find this custom service in the Controller Service panel.

However, when I'd like to inject this service to the "Schema Registry" property of CSVReader or AvroReader, there are only two default schema registries to choose, without the one I added. Please see the attached picture.

How to make my custom schema registry service available for the other services to inject? In other words, how to make it available in the drop-down list in the attached picture?

BTW, I am using Apache NiFi v1.3.

Thanks.

16554-nifi-custom-services.png

1 ACCEPTED SOLUTION

avatar
Master Guru

Your custom NAR needs to have a NAR dependency in the pom.xml on the standard services API:

 <dependency>
            <groupId>org.apache.nifi</groupId>
            <artifactId>nifi-standard-services-api-nar</artifactId>
            <type>nar</type>
        </dependency>

If you can share your custom NAR code or pom files I can take a look.

View solution in original post

3 REPLIES 3

avatar
Master Guru

Your custom NAR needs to have a NAR dependency in the pom.xml on the standard services API:

 <dependency>
            <groupId>org.apache.nifi</groupId>
            <artifactId>nifi-standard-services-api-nar</artifactId>
            <type>nar</type>
        </dependency>

If you can share your custom NAR code or pom files I can take a look.

avatar
Expert Contributor

Yes, after add this dependency. It works. Thanks.

avatar
Master Guru

@Alvin Jin

Also, I know you already implemented a custom service, but there is also some work here by one of the Apache NiFi committers: https://github.com/apache/nifi/pull/1938