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.
-
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. You return to the Cloudera
Manager home page.
-
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:
<property>
<name>phoenix.transactions.enabled</name>
<value>true</value>
</property>
-
Enter a Reason for change, and then click
Save Changes to commit the changes.
-
Restart the role and service when Cloudera Manager prompts you to
restart.