Installing Apache Phoenix using Cloudera Manager

You can install Apache Phoenix using Cloudera Manager 5.16.2. To install Apache Phoenix:

Downloading and Installing the Phoenix Parcel

Minimum Required Role: Cluster Administrator (also provided by Full Administrator)

  1. In the Parcels page, click Configuration.
  2. In the Remote Parcel Repository URLs section, add a new entry and type the correct Phoenix parcel repository URL in the format:
    https://username:password@archive.cloudera.com/p/phoenix/parcel_version/parcels/
    For example,
    https://username:password@archive.cloudera.com/p/phoenix/5.16.2/parcels/
  3. Click Save Changes.

    The Phoenix parcel will now be available to download.

  4. In the Location selector, click the cluster name in which you want to install Phoenix.

    The Phoenix parcel is listed as Available Remotely in the Status column.

  5. Click Download to download the Phoenix parcel to your local repository. The status changes to Downloading.
  6. Click Distribute. The status changes to Distributing. During distribution, you can:
    • Click the Details link in the Status column to view the Parcel Distribution Status page.
    • Click Cancel to cancel the distribution. When the Distribute action completes, the button changes to Activate, and you can click the Distributed status link to view the status page.
  7. Click Activate to activate the parcel.

    You will see Distributed, Activated in the Status column.

Configuring HBase for use with Phoenix

Minimum Required Role: Cluster Administrator (also provided by Full Administrator)

Before you start using Phoenix, you must configure the following HBase properties using Cloudera Manager:

  1. Go to the HBase service.
  2. Click the Configuration tab.
  3. Select Scope > HBase Cluster (Service-Wide).
  4. Locate the HBase Service Advanced Configuration Snippet (Safety Valve) for hbase-site.xml property or search for it by typing its name in the Search box.
  5. Click View as XML, and add the following properties:
    • Set hbase.regionserver.wal.codec to enable custom Write Ahead Log ("WAL") edits to be written as follows:
      <property>
      <name>hbase.regionserver.wal.codec</name>
      <value>org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec</value>
      </property> 
    • Set the following property to enable user-defined functions:
      <property>
       <name>phoenix.functions.allowUserDefinedFunctions</name>
       <value>true</value>
       <description>enable UDF functions</description>
      </property>
  6. Enter a Reason for change, and then click Save Changes to commit the changes.
  7. Restart the role and service when Cloudera Manager prompts you to restart.

Validating the Phoenix Installation

Validating a Native Phoenix Installation on an Unsecured Cluster

To validate your installation, log in as the hbase user, and run the following smoke tests from the command prompt: :

phoenix-psql /opt/cloudera/parcels/phoenix parcel/lib/phoenix/examples/WEB_STAT.sql 
/opt/cloudera/parcels/<phoenix parcel>/lib/phoenix/examples/WEB_STAT.csv 
/opt/cloudera/parcels/<phoenix parcel>/lib/phoenix/examples/WEB_STAT_QUERIES.sql

Validating a Native Phoenix Installation on a Cluster Secured with Kerberos

To validate your installation, log in as the hbase user, and perform the following actions:

  1. Obtain a valid Kerberos ticket by running kinit. For example:
    kinit var/run/cloudera-scm-agent/process/<latest-process-id>-HBASE/hbase.keytab hbase/<local.node.host.name>
    
  2. Run the following smoke tests from your command line in your cluster:
    phoenix-psql

    You will see the help displayed for the phoenix-psql script. You can test Phoenix using one of the examples that you can find here: /opt/cloudera/parcels/Phoenix parcel/lib/phoenix/examples

    For example,
    phoenix-psql /opt/cloudera/parcels/PHOENIX-4.14.1-cdh5.16.2/lib/phoenix/examples/WEB_STAT.sql