@@ -85,9 +85,9 @@ pom.xml file:
8585
8686``` xml
8787<dependency >
88- <groupId >com.yahoo .omid</groupId >
89- <artifactId >hbase-client</artifactId >
90- <version >${hbase_client.version} </version >
88+ <groupId >org.apache .omid</groupId >
89+ <artifactId >omid- hbase-client-hbase1.x </artifactId >
90+ <version >1.0.1 </version >
9191</dependency >
9292```
9393
@@ -109,12 +109,15 @@ different rows of a table in a transactional context, but is enough to show how
109109detailed explanation of the client interfaces can be found in the [ Basic Examples] ( basic-examples.html ) section.
110110
111111``` java
112+ import org.apache.hadoop.hbase.client.Connection ;
113+ import org.apache.hadoop.hbase.client.ConnectionFactory ;
112114import org.apache.hadoop.hbase.client.Put ;
113115import org.apache.hadoop.hbase.util.Bytes ;
114- import com.yahoo.omid.transaction.HBaseTransactionManager ;
115- import com.yahoo.omid.transaction.TTable ;
116- import com.yahoo.omid.transaction.Transaction ;
117- import com.yahoo.omid.transaction.TransactionManager ;
116+ import org.apache.omid.transaction.HBaseTransactionManager ;
117+ import org.apache.omid.transaction.TTable ;
118+ import org.apache.omid.transaction.Transaction ;
119+ import org.apache.omid.transaction.TransactionManager ;
120+ import org.testng.annotations.Test ;
118121
119122public class OmidExample {
120123
@@ -124,16 +127,17 @@ public class OmidExample {
124127 public static void main (String [] args ) throws Exception {
125128
126129 try (TransactionManager tm = HBaseTransactionManager . newInstance();
127- TTable txTable = new TTable (" MY_TX_TABLE" )) {
130+ Connection conn = ConnectionFactory . createConnection();
131+ TTable txTable = new TTable (conn, " MY_TX_TABLE" )) {
128132
129133 Transaction tx = tm. begin();
130134
131135 Put row1 = new Put (Bytes . toBytes(" EXAMPLE_ROW1" ));
132- row1. add (family, qualifier, Bytes . toBytes(" val1" ));
136+ row1. addColumn (family, qualifier, Bytes . toBytes(" val1" ));
133137 txTable. put(tx, row1);
134138
135139 Put row2 = new Put (Bytes . toBytes(" EXAMPLE_ROW2" ));
136- row2. add (family, qualifier, Bytes . toBytes(" val2" ));
140+ row2. addColumn (family, qualifier, Bytes . toBytes(" val2" ));
137141 txTable. put(tx, row2);
138142
139143 tm. commit(tx);
@@ -153,19 +157,32 @@ the application code by creating an instance of the `HBaseOmidClientConfiguratio
153157creation of the transaction manager:
154158
155159``` java
156- import com.yahoo.omid.transaction.HBaseOmidClientConfiguration ;
157-
158- ...
159-
160- HBaseOmidClientConfiguration omidClientConfiguration = new HBaseOmidClientConfiguration ();
161- omidClientConfiguration. setConnectionType(DIRECT );
162- omidClientConfiguration. setConnectionString(" my_tso_server_host:54758" );
163- omidClientConfiguration. setRetryDelayMs(3000 );
160+ import org.apache.hadoop.hbase.client.Connection ;
161+ import org.apache.hadoop.hbase.client.ConnectionFactory ;
162+ import org.apache.hadoop.hbase.util.Bytes ;
163+ import org.apache.omid.transaction.HBaseOmidClientConfiguration ;
164+ import org.apache.omid.transaction.HBaseTransactionManager ;
165+ import org.apache.omid.transaction.TTable ;
166+ import org.apache.omid.transaction.TransactionManager ;
167+ import org.apache.omid.tso.client.OmidClientConfiguration ;
168+
169+ public class OmidExample {
170+
171+ public static void main (String [] args ) throws Exception {
172+ HBaseOmidClientConfiguration omidClientConfiguration = new HBaseOmidClientConfiguration ();
173+ omidClientConfiguration. setConnectionType(OmidClientConfiguration . ConnType . DIRECT );
174+ omidClientConfiguration. setConnectionString(" my_tso_server_host:54758" );
175+ omidClientConfiguration. setRetryDelayInMs(3000 );
164176
165- try (TransactionManager tm = HBaseTransactionManager . newInstance(omidClientConfiguration);
166- TTable txTable = new TTable (" MY_TX_TABLE" )) {
167-
168- ...
177+ try (TransactionManager tm = HBaseTransactionManager . newInstance(omidClientConfiguration);
178+ Connection conn = ConnectionFactory . createConnection();
179+ TTable txTable = new TTable (conn, " MY_TX_TABLE" )) {
180+
181+ }
182+ }
183+
184+ }
185+
169186```
170187
171188Also, you will need to create a HBase table "MY_TX_TABLE", with column family "MY_CF", and with ` TTL ` disabled and
0 commit comments