Support Questions
Find answers, ask questions, and share your expertise

how to Enable the transaction in phoneix after setting property?

how to Enable the transaction in phoneix after setting property?

New Contributor

0: jdbc:phoenix:localhost> CREATE TABLE my_table (k BIGINT PRIMARY KEY, v VARCHAR) TRANSACTIONAL=true;

Error: ERROR 1078 (44A09): Cannot create a transactional table if transactions are disabled. tableName=MY_TABLE (state=44A09,code=1078) java.sql.SQLException: ERROR 1078 (44A09): Cannot create a transactional table if transactions are disabled. tableName=MY_TABLE at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:464) at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:150) at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:1811) at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:939) at org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:211) at ....

I added the property as bleow in hbase-site.xml which is present in server part where hbase is installed..

  1. <property><name>phoenix.transactions.enabled</name><value>true</value></property>
  2. <property><name>data.tx.snapshot.dir</name><value>/tmp/tephra/snapshots</value></property>
  3. .bin/tephra start

i think it should be added in client part i.e phoenix side where i type a qurey.

can you help me where i need to add the hbase-site.xml file in phoneix dir? or how i need to fix this issue?

i have started tephra as in the https://github.com/caskdata/tephra. hbase and phoneix is running in standalone mode.