Hi Bryan,

I am new to Nifi, I'm tried to create custom processor with hive connection
pooling service as per your concern. But
same issue is occuring in custom processor. It shows only connection id. I
have no idea about pom file dependency.
Here I mentioned the steps what i have followed to create custom processor
with hive connection below. If it's wrong,
Please provide any link to get workflow for creating custom processor with
hive database connection pooling service.

- Added below line in custom processor java class
*  public static final PropertyDescriptor HIVE_DBCP_SERVICE = new
PropertyDescriptor.Builder()*
*            .name("Hive Database Connection Pooling Service")*
*            .description("The Hive Controller Service that is used to
obtain connection(s) to the Hive database")*
*            .required(true)*
*            .identifiesControllerService(HiveDBCPService.class)*
*            .build();*

- After imported HiveDBCPService in same java class
*  import org.apache.nifi.dbcp.hive.HiveDBCPService;*

*- *After searched dependency at maven repositories for HiveDBCPService and
added

- In nifi-custom-nar pom file, added following lines,
 * <dependency>*
*            <groupId>org.apache.nifi</groupId>*
*            <artifactId>nifi-hive-processors</artifactId>*
*            <version>1.0.0</version>*
*        </dependency>*
*        <dependency>*
*            <groupId>org.apache.nifi</groupId>*
*            <artifactId>nifi-hadoop-libraries-nar</artifactId>*
*            <type>nar</type>*
*        </dependency>*

- In nifi-custom-processor pom file, added following lines,
  *<dependency>*
*            <groupId>commons-dbcp</groupId>*
*            <artifactId>commons-dbcp</artifactId>*
*            <version>1.5-SNAPSHOT</version>*
*            <type>jar</type>*
*        </dependency>*
*        <dependency>*
*            <groupId>org.apache.hadoop</groupId>*
*            <artifactId>hadoop-core</artifactId>*
*            <version>1.2.1</version>*
*            <type>jar</type>*
*        </dependency>*
*        <dependency>*
*            <groupId>org.apache.hadoop</groupId>*
*            <artifactId>hadoop-common</artifactId>*
*            <version>3.0.0-SNAPSHOT</version>*
*            <type>jar</type>*
*        </dependency>*
*        <dependency>*
*            <groupId>org.apache.hive</groupId>*
*            <artifactId>hive-jdbc</artifactId>*
*            <version>1.3.0-SNAPSHOT</version>*
*            <type>jar</type>*
*        </dependency>*
*        <dependency>*
*            <groupId>org.apache.nifi</groupId>*
*            <artifactId>nifi-hadoop-utils</artifactId>*
*            <version>1.0.0</version>*
*            <type>jar</type>*
*        </dependency>*
*        <dependency>*
*            <groupId>org.apache.nifi</groupId>*
*            <artifactId>nifi-hive-processors</artifactId>*
*            <version>1.0.0</version>*
*            <type>jar</type>*
*        </dependency>*

*- *After taking build and replaced Nar file in lib folder, restarted Nifi
source. Same error connection id only showing in
connection dropdown box.

Thanks in advance.

Regards,
Nijandan D

On Thu, Feb 9, 2017 at 8:22 PM, Bryan Bende <bbe...@gmail.com> wrote:

> Hello,
>
> This usually means your custom NAR is not correctly linked to the NAR
> where the service is.
>
> Take a look at these resources for examples:
>
> https://cwiki.apache.org/confluence/display/NIFI/Maven+
> Projects+for+Extensions#MavenProjectsforExtensions-
> LinkingProcessorsandControllerServices
>
> https://github.com/bbende/nifi-dependency-example/blob/
> master/nifi-example-processor-bundle/nifi-example-
> processors-nar/pom.xml#L40
>
> Thanks,
>
> Bryan
>
> On Wed, Feb 8, 2017 at 11:49 PM, cool nijandhan <nijandha...@gmail.com>
> wrote:
> > Hi
> >
> > I am developing custom processor with hive database connection pooling
> > service. Added necessary dependency in pom file and added necessary
> folders
> > in custom processor folder. I have created class file and able to
> generate
> > nar file. Placed nar file in lib directory and restarted nifi server. Its
> > look like everything working fine. But services are not showing in
> database
> > connection dropdown box. Instead it showing connection id, but every time
> > services are creating when click "create" in controller section. For
> other
> > processors, it seems working fine. Please find the attached screenshots.
> >
> > Any help appreciated.
> >
> > Thanks
>

Reply via email to