public class HbasePhoenixMainApp {
public static void main(String[] args) throws SQLException {
Connection connection = null;
Statement st = null;
Properties connectionProps = new Properties();
connectionProps.put("phoenix.connection.autoCommit", "true");//only clientconnectionProps.put("phoenix.transactions.enabled", "true");//only clientconnection = DriverManager.getConnection("jdbc:phoenix:localhost:2181",connectionProps);st = connection.createStatement();st.executeUpdate("CREATE TABLE MYTEST.MYTAB (employee_id integer not null primary key, name varchar) TRANSACTIONAL=true");st.executeUpdate("UPSERT INTO MYTEST.MYTAB VALUES (1,'Vishal')");st.executeUpdate("UPSERT INTO MYTEST.MYTAB VALUES (2,'Biradar')");int c = 10/0; //here exception will be raisedst.executeUpdate("UPSERT INTO MYTEST.MYTAB VALUES (3,'India')");}//main method closed
--
You received this message because you are subscribed to the Google Groups "Tephra User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tephra-user...@googlegroups.com.
To post to this group, send email to tephr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tephra-user/1fe612a7-3cee-4669-98e1-f06a0f594226%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to tephra-user+unsubscribe@googlegroups.com.
To post to this group, send email to tephr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tephra-user/1fe612a7-3cee-4669-98e1-f06a0f594226%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Tephra User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tephra-user+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tephra-user/8D2C8524-47BD-4343-A6D8-2E5E18EE93A7%40cask.co.