Getting Started with Streaming Analytics
Also available as:
PDF
loading table of contents...

​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

  1. If HBase is not installed, install/add an HBase service.

  2. Ensure that Phoenix is enabled on the HBase Cluster.

  3. Download the Sam-Custom-Extensions.zip and save it to your local machine.

  4. Unzip the contents. We will call the unziped folder $SAM_EXTENSIONS

Steps for Creating Phoenix Tables and Loading Reference Data

  1. Copy the $SAM_EXTENSIONS/scripts.tar.gz to a node where where HBase/PHoenix client is installed.

  2. On that node, untar the scripts.tar.gz. We will call this directory $SCRIPTS

    tar -zxvf scripts.tar.gz
  3. 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
  4. Open the file phoenix_create.sh and replace <ZK_HOST> with the FQDN of your ZooKeeper host.

  5. 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

  1. Start up sqline Phoenix client.

    cd /usr/hdp/current/phoenix-client/bin
    
    ./sqlline.py $ZK_HOST:2181:/hbase-unsecure
  2. List all the tables in Pheonix.

    !tables
  3. Query the drivers and timesheet tables.

    select * from drivers;
    select * from timesheet;