Community Articles
Find and share helpful community-sourced technical articles
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Cloudera Employee

Overview

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:

[ADD IMAGE]

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.

[ADD FLOW IMAGE]

Step 1: Create a request handler

StandardHttpContextMap

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

[ADD CONTROLLER IMAGE]

HandleHttpRequest: Receive request and data

Create a processor simple HandleHttpRequest processor.

[ADD PROCESSOR IMAGE]

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

HandleHttpRequest

8012

HTTP Context Map

StandardHttpContextMap (the controller you just created)

Allowed Paths

/dashboard

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

130 Views
0 Kudos
Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎10-15-2018 03:17 PM
Updated by:
 
Contributors
Top Kudoed Authors