Installing Phoenix into the HDP 2.2 Sandbox

Perform the following as root
yum install phoenix

If the HDP repo times out with yum, copy the Phoenix RPM to the Sandobx and perform an install with rpm -i
OR
modify /etc/yum.conf, add the line “timeout=999″ and then perform a “yum clean all”

You will need to update some HBase settings now.

Set/modify the following properties:

<property>
   <name>hbase.regionserver.wal.codec</name>
   <value>org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec</value>
</property>

<property>
   <name>hbase.region.server.rpc.scheduler.factory.class</name>
   <value>org.apache.phoenix.hbase.index.ipc.PhoenixIndexRpcSchedulerFactory</value>
</property>

<property>
   <name>phoenix.query.timeoutMs</name>
   <value>600000</value>
   <!-- this is a really big value -->
</property>

<property>
   <name>hbase.rpc.timeout</name>
   <value>360000000</value>
<!-- this is a really big value -->
</property>

<property>
   <name>hbase.client.scanner.timeout.period</name>
   <value>6000000</value>
<!-- this is a really big value -->
</property>

<property>
   <name>hbase.regionserver.lease.period</name>
   <value>6000000</value>
   <!-- this is a really big value -->
</property>

Running the Phoenix JDBC-based CLI (sqlline.py)

First, find out the value for the HBase Zookeeper root. Look in /etc/hbase/conf/hbase-site.xml for the zookeeper.znode.parent value.

<property>
   <name>zookeeper.znode.parent</name>
   <value>/hbase-unsecure</value>
</property>

prompt> su – hbase
prompt> cd /usr/hdp/current/hbase-client
prompt> bin/sqlline.py localhost:2181:/hbase-unsecure

Optional: Create a user to execute the Phoenix commands so you don’t have to be the hbase user

useradd phuser -g users #the group users already existed

Update the new user’s environment so they can execute the Phoenix JDBC client.

Change /home/phuser/.bash_profile to add this line
PHOENIX_PATH=/usr/hdp/current/phoenix-client/bin
and update the path to this
PATH=$PATH:$HOME/bin:$PHOENIX_PATH

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>