tephra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "vishal (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (TEPHRA-237) How to use Auto-Commit and transactions in Phoenix ??
Date Fri, 07 Jul 2017 04:44:02 GMT

     [ https://issues.apache.org/jira/browse/TEPHRA-237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

vishal updated TEPHRA-237:
--------------------------
    Summary: How to use Auto-Commit and transactions in Phoenix ??  (was: Unable to discover
tx service)

> How to use Auto-Commit and transactions in Phoenix ??
> -----------------------------------------------------
>
>                 Key: TEPHRA-237
>                 URL: https://issues.apache.org/jira/browse/TEPHRA-237
>             Project: Tephra
>          Issue Type: Bug
>         Environment: Hbase Version : 1.2.6
> Phoenix Version : 4.10.0-Hbase-1.2 
>            Reporter: vishal
>            Assignee: Poorna Chandra
>
> My Java prog is:
> {code:java}
> Properties connectionProps = new Properties();
> connectionProps.put("phoenix.schema.isNamespaceMappingEnabled", "true");//client+server
> connectionProps.put("phoenix.schema.mapSystemTablesToNamespace","true");//client+server
> connectionProps.put("phoenix.connection.autoCommit", "true");//client
> connectionProps.put("phoenix.transactions.enabled", "true");//client+server
> Connection connection = DriverManager.getConnection("jdbc:phoenix:localhost:2181",connectionProps);
> Statement st = connection.createStatement();
> st.executeUpdate("CREATE TABLE MYTEST1.MYTAB (employee_id integer not null primary key,
name varchar) TRANSACTIONAL=true");
> System.out.println("table is created");
> {code}
> hbase-site.xml file
> ------------
> {code:java}
> <configuration>
> <property>
>     <name>hbase.rootdir</name>
>     <value>file:/Users/sai/projects/vishal/software/hbase-data</value>
> </property>
>  
> <property>
>     <name>hbase.zookeeper.property.dataDir</name>
>     <value>/Users/sai/projects/vishal/software/zookeeper-data</value>
> </property>
> <property>
>     <name>phoenix.schema.isNamespaceMappingEnabled</name>
>     <value>true</value>
> </property>
> <property>
>     <name>phoenix.schema.mapSystemTablesToNamespace</name>
>     <value>true</value>
> </property>
> <property>
>     <name>phoenix.transactions.enabled</name>
>     <value>true</value>
> </property>
> <property>
>     <name>data.tx.snapshot.dir</name>
>     <value>/Users/sai/projects/vishal/software/tephra/snapshots</value>
> </property>
> </configuration>
> {code}
> But I am getting above error??
> What else i need to do ??



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message