nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charlie Meyer <>
Subject Re: Custom Controller Service
Date Thu, 26 Apr 2018 16:36:39 GMT

I'm working to see what we can share, but for a start, here is how we
handle the delegating controller service:

package com.civitaslearning.nifi.service.impl;

import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.controller.AbstractControllerService;
import org.apache.nifi.dbcp.DBCPService;

import java.util.Collections;
import java.util.List;
import java.util.UUID;

public class DelegatingDBCPServiceImpl extends
AbstractControllerService implements DelegatingDBCPService {

  private static final List<PropertyDescriptor> properties =

  public DBCPService getDBCPService(UUID uuid) {
    DBCPService dbcpService =

    if (dbcpService == null) {
      throw new NullPointerException("Couldn't find DBCP service with
ID " + uuid);

    return dbcpService;

  public List<PropertyDescriptor> getSupportedPropertyDescriptors() {
    return properties;

>From there, we took existing nifi processor code such as ExecuteSQL and
modified it to require a reference to a delegating service rather than a
DBCP service and added another property to specify which flow file
attribute has the id of the dbcp service that should be used, similar to:

final DelegatingDBCPService delegatingDBCPService =
final UUID dbcpServiceId =
final DBCPService dbcpService =


On Thu, Apr 26, 2018 at 4:07 AM, RP <> wrote:

> Hi Charlie,
> Thanks for the reply. It seems that you already have a solution to my
> problem. If possible, can you please share you code for the custom
> controller service and the custom processor?
> -----
> RP
> --
> Sent from:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message