I changed the write part to the code below, I ran it in debug mode and killed it exactly after
Transaction. commitPrimary();
Then when I try to read (with Themis api) the primary line I get the value, but when I am trying to read the secondaries, I get TransactionExpiredException or LockConflictException
Please let me know what I am doing wrong ?
Some disclaimers:
I compiled the code with 2.0.0-cdh4.4.0</hadoop.version>
0.94.6-cdh4.4.0
cause of that I had to change some code, but it was pretty straightforward.
I am not using LocalTimestampOracle.
//Code :
{
// write two rows
Transaction transaction = new Transaction(conf, connection);
ThemisPut put = new ThemisPut("another row".getBytes()).add(FAMILY, QUALIFIER, VALUE);
transaction.put(TABLENAME, put);
for (int i = 0 ; i < 10 ; i++ ){
put = new ThemisPut(("another row"+ i).getBytes()).add(FAMILY, QUALIFIER, ("This is another value !!" + i ).getBytes());
transaction.put(TABLENAME, put);
}
transaction.commit();
System.out.println("init, using themisPut, set valueA=10, valueB=10");
}
Hi, I am testing your code. And in order to understand it, I ran the Example.java code https://github.com/XiaoMi/themis/blob/master/themis-client/src/main/java/org/apache/hadoop/hbase/themis/example/Example.java
I changed the write part to the code below, I ran it in debug mode and killed it exactly after Transaction. commitPrimary();
Then when I try to read (with Themis api) the primary line I get the value, but when I am trying to read the secondaries, I get TransactionExpiredException or LockConflictException
Please let me know what I am doing wrong ?
Some disclaimers:
//Code : { // write two rows Transaction transaction = new Transaction(conf, connection); ThemisPut put = new ThemisPut("another row".getBytes()).add(FAMILY, QUALIFIER, VALUE); transaction.put(TABLENAME, put); for (int i = 0 ; i < 10 ; i++ ){ put = new ThemisPut(("another row"+ i).getBytes()).add(FAMILY, QUALIFIER, ("This is another value !!" + i ).getBytes()); transaction.put(TABLENAME, put); }