tephra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "vishal (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TEPHRA-237) Unable to discover tx service
Date Thu, 06 Jul 2017 07:42:00 GMT

    [ https://issues.apache.org/jira/browse/TEPHRA-237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16076103#comment-16076103
] 

vishal commented on TEPHRA-237:
-------------------------------

Hi, I followed those steps once again and now it is working fine.
But I am not getting what is the actual use of transactions.I am using Hbase with phoenix
and trying to use transactions in phoenix java program as show above.
Can we rollback the schema or table creation statements also ??
For ex below are my set of operations :
1)Create Schema
2)Create Table
3)Insert Data In Table
4)Exception
5)Insert Data In Table

So in above case as exception is raised at step 4 , it must rollback all the above 5 operations
but it is only rollbacking the operations after which exceptions are not raised that is 5th.


> Unable to discover tx service
> -----------------------------
>
>                 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