incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1228404 - in /incubator/lcf/branches/CONNECTORS-286/warthog/src: main/java/org/apache/warthog/api/ main/java/org/apache/warthog/keyvaluetablestore/ test/java/org/apache/warthog/tests/
Date Fri, 06 Jan 2012 21:06:14 GMT
Author: kwright
Date: Fri Jan  6 21:06:14 2012
New Revision: 1228404

URL: http://svn.apache.org/viewvc?rev=1228404&view=rev
Log:
Add update vs. non-update semantics to the API

Modified:
    incubator/lcf/branches/CONNECTORS-286/warthog/src/main/java/org/apache/warthog/api/WHTableStore.java
    incubator/lcf/branches/CONNECTORS-286/warthog/src/main/java/org/apache/warthog/keyvaluetablestore/TableStore.java
    incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/MultiThreadTest.java
    incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/PerformanceTest.java
    incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/SanityTest.java

Modified: incubator/lcf/branches/CONNECTORS-286/warthog/src/main/java/org/apache/warthog/api/WHTableStore.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-286/warthog/src/main/java/org/apache/warthog/api/WHTableStore.java?rev=1228404&r1=1228403&r2=1228404&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-286/warthog/src/main/java/org/apache/warthog/api/WHTableStore.java
(original)
+++ incubator/lcf/branches/CONNECTORS-286/warthog/src/main/java/org/apache/warthog/api/WHTableStore.java
Fri Jan  6 21:06:14 2012
@@ -26,8 +26,10 @@ package org.apache.warthog.api;
 */
 public interface WHTableStore
 {
-  /** Begin a transaction */
-  public void beginTransaction()
+  /** Begin a transaction.
+  *@param updateType is true if the transaction is an update-style transaction, false otherwise.
+  */
+  public void beginTransaction(boolean updateType)
     throws WHException;
   
   /** Commit a transaction */

Modified: incubator/lcf/branches/CONNECTORS-286/warthog/src/main/java/org/apache/warthog/keyvaluetablestore/TableStore.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-286/warthog/src/main/java/org/apache/warthog/keyvaluetablestore/TableStore.java?rev=1228404&r1=1228403&r2=1228404&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-286/warthog/src/main/java/org/apache/warthog/keyvaluetablestore/TableStore.java
(original)
+++ incubator/lcf/branches/CONNECTORS-286/warthog/src/main/java/org/apache/warthog/keyvaluetablestore/TableStore.java
Fri Jan  6 21:06:14 2012
@@ -59,7 +59,7 @@ public class TableStore implements WHTab
   }
   
   /** Begin a transaction */
-  public void beginTransaction()
+  public void beginTransaction(boolean updateType)
     throws WHException
   {
     if (currentTransaction != null)

Modified: incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/MultiThreadTest.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/MultiThreadTest.java?rev=1228404&r1=1228403&r2=1228404&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/MultiThreadTest.java
(original)
+++ incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/MultiThreadTest.java
Fri Jan  6 21:06:14 2012
@@ -104,11 +104,11 @@ public class MultiThreadTest
     
     WHTableStore ts = new TableStore(new InMemNativeTransactionalStoreImpl(store));
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     ts.createTable("testtable",new String[]{"colA","colB","colC","colD","colE","colF","colG","colH","colI","colJ"});
     ts.commitTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     WHTable table = ts.lookupTable("testtable");
     ts.createIndex("testindex1",table,
       new String[]{"colB","colA"},
@@ -181,11 +181,11 @@ public class MultiThreadTest
     
     WHTableStore ts = new TableStore(new InMemNativeTransactionalStoreImpl(store));
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     ts.createTable("testtable",new String[]{"colA","colB","colC","colD","colE","colF","colG","colH","colI","colJ"});
     ts.commitTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     WHTable table = ts.lookupTable("testtable");
     ts.createIndex("testindex1",table,
       new String[]{"colB","colA"},
@@ -314,7 +314,7 @@ public class MultiThreadTest
         // Add a row
         while (true)
         {
-          ts.beginTransaction();
+          ts.beginTransaction(true);
           try
           {
             WHTable table = ts.lookupTable("testtable");
@@ -399,7 +399,7 @@ public class MultiThreadTest
         // Add a row
         while (true)
         {
-          ts.beginTransaction();
+          ts.beginTransaction(true);
           try
           {
             WHTable table = ts.lookupTable("testtable");
@@ -427,7 +427,7 @@ public class MultiThreadTest
         // Do a query
         while (true)
         {
-          ts.beginTransaction();
+          ts.beginTransaction(false);
           try
           {
             WHIndex index = ts.lookupIndex("testindex1");
@@ -457,7 +457,7 @@ public class MultiThreadTest
         // Do another query
         while (true)
         {
-          ts.beginTransaction();
+          ts.beginTransaction(false);
           try
           {
             WHIndex index = ts.lookupIndex("testindex2");
@@ -487,7 +487,7 @@ public class MultiThreadTest
         // Do a third query
         while (true)
         {
-          ts.beginTransaction();
+          ts.beginTransaction(false);
           try
           {
             WHIndex index = ts.lookupIndex("testindex3");

Modified: incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/PerformanceTest.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/PerformanceTest.java?rev=1228404&r1=1228403&r2=1228404&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/PerformanceTest.java
(original)
+++ incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/PerformanceTest.java
Fri Jan  6 21:06:14 2012
@@ -36,11 +36,11 @@ public class PerformanceTest
   {
     WHTableStore ts = new TableStore(new InMemNativeTransactionalStoreImpl(new InMemAtomicNativeKeyValueStore(16777216)));
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     ts.createTable("testtable",new String[]{"colA","colB","colC","colD","colE","colF","colG","colH","colI","colJ"});
     ts.commitTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     WHTable table = ts.lookupTable("testtable");
     ts.createIndex("testindex1",table,
       new String[]{"colB","colA"},
@@ -92,7 +92,7 @@ public class PerformanceTest
     long startTime = System.currentTimeMillis();
     for (int i = 0 ; i < rowCount ; i++)
     {
-      ts.beginTransaction();
+      ts.beginTransaction(true);
       table = ts.lookupTable("testtable");
       table.insertRow(new String[]{"colA","colB","colC","colD","colE","colF","colG","colH","colI","colJ"},
         new WHValue[]{

Modified: incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/SanityTest.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/SanityTest.java?rev=1228404&r1=1228403&r2=1228404&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/SanityTest.java
(original)
+++ incubator/lcf/branches/CONNECTORS-286/warthog/src/test/java/org/apache/warthog/tests/SanityTest.java
Fri Jan  6 21:06:14 2012
@@ -36,21 +36,21 @@ public class SanityTest
   {
     WHTableStore ts = createInMemTableStore();
     
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     ts.createTable("testtable",new String[]{"colA","colB","colC"});
     ts.commitTransaction();
     
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     WHTable table = ts.lookupTable("testtable");
     table.insertRow(new String[]{"colA","colC"},new WHValue[]{new LongValue(123L),new StringValue("hello")});
     ts.commitTransaction();
     
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable");
     table.insertRow(new String[]{"colA","colC","colB"},new WHValue[]{new LongValue(456L),new
StringValue("goodbye"),new BooleanValue(true)});
     ts.commitTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable");
     WHAccessor accessor = table.buildAccessor();
     boolean seen123 = false;
@@ -76,12 +76,12 @@ public class SanityTest
       throw new Exception("Missing rows");
     ts.abandonTransaction();
     
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable");
     table.updateRows(new String[]{"colC"},new WHValue[]{new StringValue("abcdefg")},table.buildAccessor());
     ts.commitTransaction();
     
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable");
     accessor = table.buildAccessor();
     while (true)
@@ -97,7 +97,7 @@ public class SanityTest
     }
     ts.abandonTransaction();
     
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     ts.dropTable("testtable");
     ts.commitTransaction();
   }
@@ -111,13 +111,13 @@ public class SanityTest
     buildNonOverlappingTestTable(ts);
     
     // Now build a one-column unique index on colA
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     WHTable table = ts.lookupTable("testtable");
     ts.createIndex("testindex",table,new String[]{"colA"},new String[]{"org.apache.warthog.common.LongComparatorAscending"},true);
     ts.commitTransaction();
     
     // Read in index order
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     WHIndex index = ts.lookupIndex("testindex");
     WHAccessor accessor = index.buildAccessor();
     assertNotNull(accessor.getCurrentRowID());
@@ -148,13 +148,13 @@ public class SanityTest
     ts.abandonTransaction();
     
     // Now add a row while the index is set up to see if it appears
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable");
     table.insertRow(new String[]{"colA","colB"},new WHValue[]{new LongValue(333L),new StringValue("><")});
     ts.commitTransaction();
     
     // Read in index order
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     index = ts.lookupIndex("testindex");
     accessor = index.buildAccessor();
     assertNotNull(accessor.getCurrentRowID());
@@ -191,7 +191,7 @@ public class SanityTest
     ts.abandonTransaction();
     
     // Build a bunch of accessors and see if they do what we expect
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     index = ts.lookupIndex("testindex");
     accessor = index.buildAccessor(new IndexCriteria[]{new IndexEquals(new LongValue(124L))},null);
     assertNotNull(accessor.getCurrentRowID());
@@ -204,7 +204,7 @@ public class SanityTest
     ts.abandonTransaction();
 
     // Various index criteria
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     index = ts.lookupIndex("testindex");
     accessor = index.buildAccessor(new IndexCriteria[]{new IndexEqualsOrBefore(new LongValue(124L))},null);
     assertNotNull(accessor.getCurrentRowID());
@@ -228,7 +228,7 @@ public class SanityTest
     assertNull(accessor.getCurrentRowID());
     ts.abandonTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     index = ts.lookupIndex("testindex");
     accessor = index.buildAccessor(new IndexCriteria[]{new IndexEqualsOrAfter(new LongValue(124L))},null);
     assertNotNull(accessor.getCurrentRowID());
@@ -252,7 +252,7 @@ public class SanityTest
     assertNull(accessor.getCurrentRowID());
     ts.abandonTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     index = ts.lookupIndex("testindex");
     accessor = index.buildAccessor(new IndexCriteria[]{new IndexBefore(new LongValue(124L))},null);
     assertNotNull(accessor.getCurrentRowID());
@@ -270,7 +270,7 @@ public class SanityTest
     assertNull(accessor.getCurrentRowID());
     ts.abandonTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     index = ts.lookupIndex("testindex");
     accessor = index.buildAccessor(new IndexCriteria[]{new IndexAfter(new LongValue(124L))},null);
     assertNotNull(accessor.getCurrentRowID());
@@ -288,7 +288,7 @@ public class SanityTest
     assertNull(accessor.getCurrentRowID());
     ts.abandonTransaction();
     
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     index = ts.lookupIndex("testindex");
     accessor = index.buildAccessor(new IndexCriteria[]{new IndexEqualsMultiple(new WHValue[]{new
LongValue(123L),new LongValue(333L)})},null);
     assertNotNull(accessor.getCurrentRowID());
@@ -306,7 +306,7 @@ public class SanityTest
     assertNull(accessor.getCurrentRowID());
     ts.abandonTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     index = ts.lookupIndex("testindex");
     accessor = index.buildAccessor(new IndexCriteria[]{new IndexBetween(new LongValue(123L),new
LongValue(333L))},null);
     assertNotNull(accessor.getCurrentRowID());
@@ -319,14 +319,14 @@ public class SanityTest
     ts.abandonTransaction();
 
     // Delete a table row and see if it goes away from the index
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable");
     index = ts.lookupIndex("testindex");
     table.deleteRows(index.buildAccessor(new IndexCriteria[]{new IndexEquals(new LongValue(124L))},null));
     ts.commitTransaction();
 
     // Go through the iterator to see if it's gone
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     index = ts.lookupIndex("testindex");
     accessor = index.buildAccessor();
     assertNotNull(accessor.getCurrentRowID());
@@ -356,7 +356,7 @@ public class SanityTest
     assertNull(accessor.getCurrentRowID());
     ts.abandonTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     ts.dropIndex("testindex");
     ts.commitTransaction();
     
@@ -371,7 +371,7 @@ public class SanityTest
     buildOverlappingTestTable(ts);
     
     // Now build a two-column unique index on colA
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     WHTable table = ts.lookupTable("testtable");
     ts.createIndex("testindex",table,
       new String[]{"colB","colA"},
@@ -380,7 +380,7 @@ public class SanityTest
     ts.commitTransaction();
     
     // Read in index order
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     WHIndex index = ts.lookupIndex("testindex");
     WHAccessor accessor = index.buildAccessor();
     assertNotNull(accessor.getCurrentRowID());
@@ -410,7 +410,7 @@ public class SanityTest
     assertNull(accessor.getCurrentRowID());
     ts.abandonTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     index = ts.lookupIndex("testindex");
     accessor = index.buildAccessor(new IndexCriteria[]{
       new IndexEquals(new StringValue("hello")),
@@ -424,7 +424,7 @@ public class SanityTest
     assertNull(accessor.getCurrentRowID());
     ts.abandonTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     ts.dropIndex("testindex");
     ts.commitTransaction();
 
@@ -437,32 +437,32 @@ public class SanityTest
     WHTableStore ts = createInMemTableStore();
     
     // Build a table with two columns, one of which can be summed, and the other of which
has repeating values.
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     ts.createTable("testtable",new String[]{"colA","colB"});
     ts.commitTransaction();
     
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     WHTable table = ts.lookupTable("testtable");
     table.insertRow(new String[]{"colA","colB"},new WHValue[]{new LongValue(1L),new StringValue("hello")});
     ts.commitTransaction();
     
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable");
     table.insertRow(new String[]{"colA","colB"},new WHValue[]{new LongValue(4L),new StringValue("goodbye")});
     ts.commitTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable");
     table.insertRow(new String[]{"colA","colB"},new WHValue[]{new LongValue(3L),new StringValue("hello")});
     ts.commitTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable");
     table.insertRow(new String[]{"colA","colB"},new WHValue[]{new LongValue(2L),new StringValue("goodbye")});
     ts.commitTransaction();
 
     // Build an index on this table to establish ordering on ColB
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable");
     ts.createIndex("testindex",table,
       new String[]{"colB"},
@@ -470,7 +470,7 @@ public class SanityTest
     ts.commitTransaction();
 
     // Now use the index as a relationship (to provide ordering), and build an aggregate
relationship based on it
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     WHIndex index = ts.lookupIndex("testindex");
     WHRelationship aggregateRelationship = new AggregateRelationship(index,new WHColumnDescription[]{
       new ColumnSumLong("colA","sumA"),
@@ -501,7 +501,7 @@ public class SanityTest
     ts.commitTransaction();
 
     // Again use the index and build a different aggregate relationship based on it
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     index = ts.lookupIndex("testindex");
     aggregateRelationship = new AggregateRelationship(index,new WHColumnDescription[]{
       new ColumnCount("countA"),
@@ -532,7 +532,7 @@ public class SanityTest
     ts.commitTransaction();
 
     // Use the table and calculate a row count
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable");
     aggregateRelationship = new AggregateRelationship(table,new WHColumnDescription[]{
       new ColumnCount("count")});
@@ -548,7 +548,7 @@ public class SanityTest
     ts.commitTransaction();
 
     // Try out min and max
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable");
     aggregateRelationship = new AggregateRelationship(table,new WHColumnDescription[]{
       new ColumnMin(new LongComparatorAscending(),"colA","minA"),
@@ -579,7 +579,7 @@ public class SanityTest
     buildNonOverlappingTestTable(ts);
 
     // Now build a one-column unique index on colA
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     WHTable table = ts.lookupTable("testtable");
     ts.createIndex("testindex",table,new String[]{"colA"},new String[]{"org.apache.warthog.common.LongComparatorAscending"},true);
     ts.commitTransaction();
@@ -589,7 +589,7 @@ public class SanityTest
     WHAccessor accessor;
     WHValue value;
     
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     index = ts.lookupIndex("testindex");
     filterRelationship = new FilterRelationship(index,new FilterEqualsOrBefore("colA",new
LongValue(124L),
       new LongComparatorAscending()));
@@ -615,7 +615,7 @@ public class SanityTest
     assertNull(accessor.getCurrentRowID());
     ts.abandonTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     index = ts.lookupIndex("testindex");
     filterRelationship = new FilterRelationship(index,new FilterEqualsOrAfter("colA",new
LongValue(124L),
       new LongComparatorAscending()));
@@ -635,7 +635,7 @@ public class SanityTest
     assertNull(accessor.getCurrentRowID());
     ts.abandonTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     index = ts.lookupIndex("testindex");
     filterRelationship = new FilterRelationship(index,new FilterBefore("colA",new LongValue(124L),
       new LongComparatorAscending()));
@@ -655,7 +655,7 @@ public class SanityTest
     assertNull(accessor.getCurrentRowID());
     ts.abandonTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     index = ts.lookupIndex("testindex");
     filterRelationship = new FilterRelationship(index,new FilterAfter("colA",new LongValue(124L),
       new LongComparatorAscending()));
@@ -668,7 +668,7 @@ public class SanityTest
     assertNull(accessor.getCurrentRowID());
     ts.abandonTransaction();
     
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     index = ts.lookupIndex("testindex");
     filterRelationship = new FilterRelationship(index,new FilterEqualsMultiple("colA",new
WHValue[]{new LongValue(123L),new LongValue(333L)},
       new LongComparatorAscending()));
@@ -682,7 +682,7 @@ public class SanityTest
     assertNull(accessor.getCurrentRowID());
     ts.abandonTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     index = ts.lookupIndex("testindex");
     filterRelationship = new FilterRelationship(index,new FilterBetween("colA",new LongValue(123L),new
LongValue(333L),
       new LongComparatorAscending()));
@@ -705,73 +705,73 @@ public class SanityTest
     // Build two tables.  First one has a single column.  Second one has two columns.
     WHTableStore ts = createInMemTableStore();
   
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     ts.createTable("testtable1",new String[]{"colC"});
     ts.commitTransaction();
     
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     WHTable table = ts.lookupTable("testtable1");
     table.insertRow(new String[]{"colC"},new WHValue[]{new LongValue(123L)});
     ts.commitTransaction();
     
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable1");
     table.insertRow(new String[]{"colC"},new WHValue[]{new LongValue(456L)});
     ts.commitTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable1");
     table.insertRow(new String[]{"colC"},new WHValue[]{new LongValue(124L)});
     ts.commitTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable1");
     table.insertRow(new String[]{"colC"},new WHValue[]{new LongValue(111L)});
     ts.commitTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     ts.createTable("testtable2",new String[]{"colA","colB"});
     ts.commitTransaction();
     
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable2");
     table.insertRow(new String[]{"colA","colB"},new WHValue[]{new LongValue(123L),new StringValue("hello")});
     ts.commitTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable2");
     table.insertRow(new String[]{"colA","colB"},new WHValue[]{new LongValue(123L),new StringValue("world")});
     ts.commitTransaction();
     
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable2");
     table.insertRow(new String[]{"colA","colB"},new WHValue[]{new LongValue(456L),new StringValue("goodbye")});
     ts.commitTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable2");
     table.insertRow(new String[]{"colA","colB"},new WHValue[]{new LongValue(456L),new StringValue("world")});
     ts.commitTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable2");
     table.insertRow(new String[]{"colA","colB"},new WHValue[]{new LongValue(124L),new StringValue("...")});
     ts.commitTransaction();
 
     // Build indexes on both of these so we establish order for the test
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable1");
     ts.createIndex("testindex1",table,new String[]{"colC"},new String[]{"org.apache.warthog.common.LongComparatorAscending"},true);
     ts.commitTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable2");
     ts.createIndex("testindex2",table,new String[]{"colA","colB"},new String[]{"org.apache.warthog.common.LongComparatorAscending",
       "org.apache.warthog.common.StringComparatorAscending"},false);
     ts.commitTransaction();
 
     // Now, build the join and iterate over it.
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     WHIndex index2 = ts.lookupIndex("testindex2");
     // Construct and index relationship builder linking the two
     WHRelationshipBuilder indexRelationshipBuilder = new IndexRelationshipBuilder(index2,
@@ -863,26 +863,26 @@ public class SanityTest
   protected void buildNonOverlappingTestTable(WHTableStore ts)
     throws WHException
   {
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     ts.createTable("testtable",new String[]{"colA","colB"});
     ts.commitTransaction();
     
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     WHTable table = ts.lookupTable("testtable");
     table.insertRow(new String[]{"colA","colB"},new WHValue[]{new LongValue(123L),new StringValue("hello")});
     ts.commitTransaction();
     
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable");
     table.insertRow(new String[]{"colA","colB"},new WHValue[]{new LongValue(456L),new StringValue("goodbye")});
     ts.commitTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable");
     table.insertRow(new String[]{"colA","colB"},new WHValue[]{new LongValue(124L),new StringValue("...")});
     ts.commitTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable");
     table.insertRow(new String[]{"colA","colB"},new WHValue[]{new LongValue(111L),new StringValue("<>")});
     ts.commitTransaction();
@@ -891,26 +891,26 @@ public class SanityTest
   protected void buildOverlappingTestTable(WHTableStore ts)
     throws WHException
   {
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     ts.createTable("testtable",new String[]{"colA","colB"});
     ts.commitTransaction();
     
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     WHTable table = ts.lookupTable("testtable");
     table.insertRow(new String[]{"colA","colB"},new WHValue[]{new LongValue(123L),new StringValue("hello")});
     ts.commitTransaction();
     
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable");
     table.insertRow(new String[]{"colA","colB"},new WHValue[]{new LongValue(456L),new StringValue("goodbye")});
     ts.commitTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable");
     table.insertRow(new String[]{"colA","colB"},new WHValue[]{new LongValue(124L),new StringValue("...")});
     ts.commitTransaction();
 
-    ts.beginTransaction();
+    ts.beginTransaction(true);
     table = ts.lookupTable("testtable");
     table.insertRow(new String[]{"colA","colB"},new WHValue[]{new LongValue(111L),new StringValue("hello")});
     ts.commitTransaction();



Mime
View raw message