Non-Ambari Cluster Installation Guide
Also available as:
PDF
loading table of contents...

Configuring HBase for Phoenix

To enable global indexing and local indexing in Phoenix, complete the following steps.

  1. Add the following properties to the hbase-site.xml file on all HBase nodes, the Master Server, and all Region servers.

    • Set hbase.defaults.for.version.skip to true:

      <property>
           <name>hbase.defaults.for.version.skip</name>
           <value>true</value>
      </property>
    • 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 properties to prevent deadlocks from occurring during index maintenance for global indexes by ensuring index updates are processed with a higher priority than data updates and also to prevent deadlocks by ensuring metadata rpc calls are processed with a higher priority than data rpc calls.

      <property>
        <name>hbase.region.server.rpc.scheduler.factory.class</name>
        <value>org.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory</value>
        <description>Factory to create the Phoenix RPC Scheduler that uses separate queues for index and metadata updates</description>
      </property>
      
      <property>
        <name>hbase.rpc.controllerfactory.class</name>
        <value>org.apache.hadoop.hbase.ipc.controller.ServerRpcControllerFactory</value>
        <description>Factory to create the Phoenix RPC Scheduler that uses separate queues for index and metadata updates</description>
      </property>
  2. To enable user-defined functions, configure the following property in hbase-site.xml on all Hbase nodes.

    <property>
     <name>phoenix.functions.allowUserDefinedFunctions</name>
     <value>true</value>
     <description>enable UDF functions</description>
    </property>
  3. [Warning]Warning

    The local indexing feature is a technical preview and considered under development. Do not use this feature in your production systems. If you have questions regarding this feature, contact Support by logging a case on our Hortonworks Support Portal.

  4. Restart the HBase Master and Region Servers.