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)
- In the Parcels page, click Configuration.
- 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/
- Click Save Changes.
The Phoenix parcel will now be available to download.
- 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.
- Click Download to download the Phoenix parcel to your local repository. The status changes to Downloading.
- 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.
- 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:
- Go to the HBase service.
- Click the Configuration tab.
- Select .
- 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.
- 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>
- Set hbase.regionserver.wal.codec to enable custom Write Ahead Log ("WAL") edits to be written as follows:
- Enter a Reason for change, and then click Save Changes to commit the changes.
- 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:
- 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>
- 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