Configure transaction support

Before you can start using transactions, you must first add the Apache Omid service and configure Apache Phoenix to enable transactions. Apache Omid provides the transaction management capability in Apache Phoenix.

  • If your cluster is Kerberized, ensure that you run the kinit command as hbase user before adding the Apache Omid service to the cluster. Ensure you have valid Kerberos credentials.
  • You can list the Kerberos credentials using the klist command, and you can obtain credentials using the kinit command.
  • Ensure that you have read/write permissions to write to Apache HBase tables in the cluster. Apache Omid creates and writes to OMID_COMMIT_TABLE and OMID_TIMESTAMP_TABLE during a transaction.

Add the Apache Omid service, and configure Apache Phoenix using Cloudera Manager.

  1. On the Home > Status tab, click to the right of the cluster name and select Add a Service. A list of service types display. You can add one type of service at a time.
  2. Select Omid and click Continue.
  3. Click Finish to complete adding the Omid service. You return to the Cloudera Manager home page.
  4. Verify the new service is started properly by checking the health status of the new service. If the Health Status is Good, then the service started properly.
  5. After the Omid service has started, go to the HBase service.
  6. Click the Configuration tab.
  7. Select Scope > Gateway.
  8. Select Category > Advanced.
  9. Locate the HBase Client Advanced Configuration Snippet property or search for HBase Client Advanced Configuration Snippet (Safety Valve) for hbase-site.xml:
    Click View as XML and add the following property value:
    <property>
      <name>phoenix.transactions.enabled</name>
      <value>true</value>
    </property>
  10. Enter a Reason for change, and then click Save Changes to commit the changes.
  11. Restart the role and service when Cloudera Manager prompts you to restart.