Category Archives: Uncategorized

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

But I wanted to use the bash shell!

Pissed at your Linux administrator because they gave you the Bourne shell as your default? Tired of type “bash” after every login? Use this technique to change your shell to Bash.

Modify, or create, a .profile file in your home directory

prompt> mkdir -p ~/.profile

And place this statement as the last line in your .profile

SHELL=/bin/bash exec /bin/bash –login

You should be able to bash with no effort at all now.

The info in this post is pulled from this page.

P.S. This should apply to any other shell supported on your system as well