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, 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.
or
If you do not
want to kinit as a hbase user, you can use
Apache Ranger in the SDX Data Lake to grant the user permissions to CREATE,
READ and WRITE on the commit table (default table name
OMID_COMMIT_TABLE) and timestamp table (default table
name OMID_TIMESTAMP_TABLE).
Apache Omid creates and
writes to OMID_COMMIT_TABLE and
OMID_TIMESTAMP_TABLE during a transaction.
Ensure that the Apache Phoenix client doing transactions should have minimum
WRITE permissions on commit table (default table name
OMID_COMMIT_TABLE).
Add the Apache Omid service, and configure Apache Phoenix using Cloudera Manager.
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.
Select Omid and click
Continue.
Click Finish to complete adding the Omid service. Return
to the Cloudera Manager home page.
The Phoenix OMID TSO service listens to the 54758 port by default, which is
in the ephemeral port range. Because of this, the service might randomly
fail to start if the port is already used.
To avoid this, change the TSO port to 24758. Follow these steps to change the
default port.
Click on the Omid service.
Go to Configuration and search for
OMID TSO server port.
Modify the port to 24758.
Enter a Reason for change, and then click
Save Changes.
Click (Stale configuration).
Restart the Omid service when Cloudera Manager prompts you to
restart.
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.
After the Omid service has started, go to the HBase service.
Click the Configuration tab.
Select Scope > Gateway.
Select Category > Advanced.
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: