Setting up your Enrichment Store and Building Custom UDFs and Processors
About This Task
As the table above indicate four of the seven features comes from HBase/Phoenix tables. This section gives you instructions on setting up the HBase/Phonenix tables timesheet and drivers, loading them with reference data, and downloading the custom UDFs and processors to do the enrichment and normalization.
Install HBase/Phoenix and download the sam-extensions
If HBase is not installed, install/add an HBase service.
Ensure that Phoenix is enabled on the HBase Cluster.
Download the Sam-Custom-Extensions.zip and save it to your local machine.
Unzip the contents. We will call the unziped folder $SAM_EXTENSIONS
Steps for Creating Phoenix Tables and Loading Reference Data
Copy the $SAM_EXTENSIONS/scripts.tar.gz to a node where where HBase/PHoenix client is installed.
On that node, untar the scripts.tar.gz. We will call this directory $SCRIPTS
tar -zxvf scripts.tar.gz
Go to the directory where the phoenix script is located which will create the phoeneix tables for enrichment and load it with reference data.
cd $SCRIPTS/phoenix
Open the file phoenix_create.sh and replace <ZK_HOST> with the FQDN of your ZooKeeper host.
Make the phoenix_create.sh script executable and execute it. Make sure you to JAVA_HOME
./phoenix_create.sh
Steps for Verifying Data has Populated Phoenix Tables
Start up sqline Phoenix client.
cd /usr/hdp/current/phoenix-client/bin ./sqlline.py $ZK_HOST:2181:/hbase-unsecure
List all the tables in Pheonix.
!tables
Query the drivers and timesheet tables.
select * from drivers; select * from timesheet;