简体   繁体   English

NIFI:未找到适用于此属性的控制器服务类型

[英]NIFI: No controller service types found that are applicable for this property

I am developing a Milo OPCUA Processor and Service for Apache NiFi.我正在为 Apache NiFi 开发 Milo OPCUA 处理器和服务。 The Processor and Service compile fine, and I am able to start NiFi with them.处理器和服务编译得很好,我可以用它们启动 NiFi。 However, when trying to configure the service for the processor that I just added, it just says "No controller service types found that are applicable for this property.".但是,当尝试为我刚刚添加的处理器配置服务时,它只是说“找不到适用于此属性的控制器服务类型。”。

Here are my POMs:这是我的 POM:

Processor JAR处理器 JAR

<parent>
    <groupId>com.tcon</groupId>
    <artifactId>pubsub</artifactId>
    <version>0.1</version>
</parent>

<artifactId>nifi-pubsub-processors</artifactId>
<packaging>jar</packaging>

<dependencies>
    <dependency>
        <groupId>org.apache.nifi</groupId>
        <artifactId>nifi-api</artifactId>
    </dependency>
    <dependency>
        <groupId>org.apache.nifi</groupId>
        <artifactId>nifi-utils</artifactId>
    </dependency>
    <dependency>
        <groupId>org.apache.nifi</groupId>
        <artifactId>nifi-mock</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>tcon</groupId>
        <artifactId>nifi-miloservice-api</artifactId>
        <version>0.1</version>
    </dependency>
</dependencies>

Processor NAR处理器 NAR

<parent>
    <groupId>com.tcon</groupId>
    <artifactId>pubsub</artifactId>
    <version>0.1</version>
</parent>

<artifactId>nifi-pubsub-nar</artifactId>
<version>0.1</version>
<packaging>nar</packaging>
<properties>
    <maven.javadoc.skip>true</maven.javadoc.skip>
    <source.skip>true</source.skip>
</properties>

<dependencies>
    <dependency>
        <groupId>com.tcon</groupId>
        <artifactId>nifi-pubsub-processors</artifactId>
        <version>0.1</version>
    </dependency>
    <dependency>
        <groupId>org.apache.nifi</groupId>
        <artifactId>nifi-standard-services-api-nar</artifactId>
        <version>1.2.0</version>
        <type>nar</type>
    </dependency>
</dependencies>

The service POMs shouldn't matter, afaik.服务 POM 应该无关紧要,afaik。 They haven't been modified, save for a few Milo dependencies.它们没有被修改,除了一些 Milo 依赖项。

As you can see, the processor JAR POM has the custom service API dependency from my custom service and the processor NAR POM has the standard API dependency from nifi.如您所见,处理器 JAR POM 具有来自我的自定义服务的自定义服务 API 依赖项,而处理器 NAR POM 具有来自 nifi 的标准 API 依赖项。

The docs say that that is all I need to do to "link" my processor to my service.文档说这就是将我的处理器“链接”到我的服务所需要做的一切。

What am I missing?我错过了什么?

You also need to register your controller service with the ServiceLoader by including a file in the src/main/resources folder of your processor JAR project.您还需要通过在处理器 JAR 项目的 src/main/resources 文件夹中包含一个文件来向 ServiceLoader 注册您的控制器服务。 You'll need a META-INF/services folder under your resources folder, with a file called org.apache.nifi.controller.ControllerService with a line containing the fully qualified name of the class implementing the ControllerService interface.您需要在资源文件夹下有一个 META-INF/services 文件夹,其中包含一个名为org.apache.nifi.controller.ControllerService的文件,其中一行包含实现 ControllerService 接口的类的完全限定名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将GCP控制器服务与自定义NiFi处理器配合使用 - Use GCP controller service with custom NiFi processor 具有标准控制器服务参考的 NiFi 自定义控制器服务可能吗? - NiFi custom controller service that has standard controller service reference possible? 为股票 nifi 处理器创建自定义 DistributedMapCacheClient 控制器服务 - Creating a custom DistributedMapCacheClient controller service for stock nifi processor 在 NIFI 中创建自定义 controller 服务时无法生成扩展的文档 - Could not generate extensions' documentation when creating custom controller service in NIFI NiFI:-无法为 CONTROLLER_SERVICE org.apache.nifi.record.sink.lookup.RecordSinkServiceLookup 创建扩展定义 - NiFI :- Failed to create Extension Definition for CONTROLLER_SERVICE org.apache.nifi.record.sink.lookup.RecordSinkServiceLookup 构造函数Service.Service()不适用 - constructor Service.Service() is not applicable BindingAdapter无法识别为适用于具有泛型的属性 - BindingAdapter not recognized as applicable to property with generics iText PdfAcroForm GetAcroForm不适用于给定的类型 - iText PdfAcroForm GetAcroForm not applicable for the types given assertEquals 只能适用于相同的数据类型吗? - Can assertEquals only be applicable for same data types? 检索适用于Amazon SES服务的发送统计信息 - Retrieving sending statistics applicable to Amazon SES service
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM