Community Articles

Find and share helpful community-sourced technical articles.
Celebrating as our community reaches 100,000 members! Thank you!


Last article of the series, and a fun one. As usual, this article is the continuation of part 1, part 2 and part 3, so make sure you read those before starting. The completion of this tutorial will finalize your end to end architecture, as depicted here:


This tutorial will be divided in 2 sections:

  • Section 1: Create a Web Service with Nifi
  • Section 2: Create a consumer application with code Igniter

Note: Section 2 will not be detailed. First, because web application development is not the main goal of Hortonworks Community Connection. Second, because I am pretty sure I did a terrible job at it considering it is not my domain of expertise, and I shouldn't spread mediocrity to the world!

Section 1: Create a Web Service with Nifi

For your entire project to work, you will have to create more than one web service although this section only goes through the creation of one (see the flow overview below). To get all the flows required for your app to work, check github here.


Step 1: Create a request handler


This can't be more straight forward. Create a StandardHttpContextMap controller service with default options and enable it.


HandleHttpRequest: Receive request and data

Create a processor simple HandleHttpRequest processor.


Here the properties you need to change (all other are standard):



HTTP Context Map

StandardHttpContextMap (the controller you just created)

Allowed Paths


Step 2: Retrieve data from Hbase

Execute SQL

Create 4 execute SQLs that will run queries retrieving all the data you need. They all rely on a DBCPConnectionPool controller for Phoenix. To understand how to create that, please refer to part 3.

Each and every Execute SQL will have a select count in them. I'm not going to list them here, but I included a template for all web services to this article

0 Kudos