按照官网进行配置
http://phoenix.apache.org/transactions.html
1、Add the following config to your client side hbase-site.xml file to enable transactions:
客户端 hbase-site.xml配置文件 添加配置
<property>
<name>phoenix.transactions.enabled</name>
<value>true</value>
</property>
2、Add the following config to your server side hbase-site.xml file to configure the transaction manager: The “Transaction Server Configuration” section of Tephra describes the available configuration options.
服务端 hbase-site.xml配置文件 添加配置
<property>
<name>data.tx.snapshot.dir</name>
<value>/tmp/tephra/snapshots</value>
</property>
<property>
<name>data.tx.timeout</name>
<value>60</value>
</property>
3、重启Hbase,使配置生效。
4、以上是官方文档给的配置,配好并不行
要在客户端和服务端的 hbase-site.xml配置文件 都添加以上三个配置
重启Hbase使配置生效
5、通过命令查找 transaction service. 启动命令 tephra
在其中一个hbase的HRegionServer上启动transaction service
find / -name tephra
cd /opt/cloudera/parcels/APACHE_PHOENIX-4.14.0-cdh5.14.2.p0.3/lib/phoenix/bin/
./tephra start