asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject [04/10] incubator-asterixdb git commit: Temp dataset support: 1. DDLs for creating a temporary dataset 2. Garbage collection for temporary dataset 3. Reading, inserting, and deleting data from (to) a temporary dataset is locking-free (except metadata loc
Date Wed, 20 May 2015 01:25:45 GMT
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/PrimaryIndexOperationTracker.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/PrimaryIndexOperationTracker.java b/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/PrimaryIndexOperationTracker.java
index ee12248..7a56600 100644
--- a/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/PrimaryIndexOperationTracker.java
+++ b/asterix-common/src/main/java/edu/uci/ics/asterix/common/context/PrimaryIndexOperationTracker.java
@@ -70,12 +70,15 @@ public class PrimaryIndexOperationTracker extends BaseOperationTracker {
     }
 
     @Override
-    public synchronized void completeOperation(ILSMIndex index, LSMOperationType opType, ISearchOperationCallback searchCallback,
-            IModificationOperationCallback modificationCallback) throws HyracksDataException {
+    public synchronized void completeOperation(ILSMIndex index, LSMOperationType opType,
+            ISearchOperationCallback searchCallback, IModificationOperationCallback modificationCallback)
+            throws HyracksDataException {
         if (opType == LSMOperationType.MODIFICATION || opType == LSMOperationType.FORCE_MODIFICATION) {
             decrementNumActiveOperations(modificationCallback);
             if (numActiveOperations.get() == 0) {
                 flushIfRequested();
+            } else if (numActiveOperations.get() < 0) {
+                throw new HyracksDataException("The number of active operations cannot be negative!");
             }
         } else if (opType == LSMOperationType.FLUSH || opType == LSMOperationType.MERGE) {
             dsInfo.undeclareActiveIOOperation();
@@ -91,7 +94,8 @@ public class PrimaryIndexOperationTracker extends BaseOperationTracker {
 
         if (!flushOnExit) {
             for (ILSMIndex lsmIndex : indexes) {
-                if (((ILSMIndexInternal) lsmIndex).hasFlushRequestForCurrentMutableComponent()) {
+                ILSMIndexInternal lsmIndexInternal = (ILSMIndexInternal) lsmIndex;
+                if (lsmIndexInternal.hasFlushRequestForCurrentMutableComponent()) {
                     needsFlush = true;
                     break;
                 }
@@ -135,7 +139,6 @@ public class PrimaryIndexOperationTracker extends BaseOperationTracker {
 
             //schedule flush after update
             accessor.scheduleFlush(lsmIndex.getIOOperationCallback());
-
         }
 
         flushLogCreated = false;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-common/src/test/java/edu/uci/ics/asterix/test/aql/TestsUtils.java
----------------------------------------------------------------------
diff --git a/asterix-common/src/test/java/edu/uci/ics/asterix/test/aql/TestsUtils.java b/asterix-common/src/test/java/edu/uci/ics/asterix/test/aql/TestsUtils.java
index 70e2f6f..1283dd6 100644
--- a/asterix-common/src/test/java/edu/uci/ics/asterix/test/aql/TestsUtils.java
+++ b/asterix-common/src/test/java/edu/uci/ics/asterix/test/aql/TestsUtils.java
@@ -390,6 +390,7 @@ public class TestsUtils {
             for (TestFileContext ctx : testFileCtxs) {
                 testFile = ctx.getFile();
                 statement = TestsUtils.readTestFile(testFile);
+                boolean failed = false;
                 try {
                     switch (ctx.getType()) {
                         case "ddl":
@@ -468,7 +469,14 @@ public class TestsUtils {
                                 TestsUtils.executeUpdate(statement);
                             } catch (Exception e) {
                                 //An exception is expected.
+                                failed = true;
+                                e.printStackTrace();
                             }
+                            if (!failed) {
+                                throw new Exception("Test \"" + testFile + "\" FAILED!\n  An exception"
+                                        + "is expected.");
+                            }
+                            System.err.println("...but that was expected.");
                             break;
                         case "script":
                             try {
@@ -489,10 +497,16 @@ public class TestsUtils {
                         case "errddl": // a ddlquery that expects error
                             try {
                                 TestsUtils.executeDDL(statement);
-
                             } catch (Exception e) {
                                 // expected error happens
+                                failed = true;
+                                e.printStackTrace();
+                            }
+                            if (!failed) {
+                                throw new Exception("Test \"" + testFile + "\" FAILED!\n  An exception"
+                                        + "is expected.");
                             }
+                            System.err.println("...but that was expected.");
                             break;
                         default:
                             throw new IllegalArgumentException("No statements of type " + ctx.getType());
@@ -505,9 +519,9 @@ public class TestsUtils {
                         System.err.println("...Unexpected!");
                         throw new Exception("Test \"" + testFile + "\" FAILED!", e);
                     } else {
-                        System.err.println("...but that was expected.");
                         LOGGER.info("[TEST]: " + testCaseCtx.getTestCase().getFilePath() + "/" + cUnit.getName()
                                 + " failed as expected: " + e.getMessage());
+                        System.err.println("...but that was expected.");
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/indexing/dataflow/HDFSLookupAdapterFactory.java
----------------------------------------------------------------------
diff --git a/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/indexing/dataflow/HDFSLookupAdapterFactory.java b/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/indexing/dataflow/HDFSLookupAdapterFactory.java
index a6dda87..3c7d239 100644
--- a/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/indexing/dataflow/HDFSLookupAdapterFactory.java
+++ b/asterix-external-data/src/main/java/edu/uci/ics/asterix/external/indexing/dataflow/HDFSLookupAdapterFactory.java
@@ -50,6 +50,8 @@ import edu.uci.ics.hyracks.api.dataflow.IOperatorDescriptor;
 import edu.uci.ics.hyracks.api.dataflow.value.RecordDescriptor;
 import edu.uci.ics.hyracks.api.job.JobSpecification;
 import edu.uci.ics.hyracks.dataflow.std.file.IFileSplitProvider;
+import edu.uci.ics.hyracks.storage.am.common.api.ISearchOperationCallbackFactory;
+import edu.uci.ics.hyracks.storage.am.common.impls.NoOpOperationCallbackFactory;
 import edu.uci.ics.hyracks.storage.am.lsm.btree.dataflow.ExternalBTreeDataflowHelperFactory;
 import edu.uci.ics.hyracks.storage.am.lsm.common.api.ILSMMergePolicyFactory;
 
@@ -140,13 +142,14 @@ public class HDFSLookupAdapterFactory implements IControlledAdapterFactory {
             throw new AlgebricksException(" Unabel to create merge policy factory for external dataset", e);
         }
 
+        boolean temp = dataset.getDatasetDetails().isTemp();
         // Create the file index data flow helper
         ExternalBTreeDataflowHelperFactory indexDataflowHelperFactory = new ExternalBTreeDataflowHelperFactory(
                 compactionInfo.first, compactionInfo.second, new SecondaryIndexOperationTrackerProvider(
                         dataset.getDatasetId()), AsterixRuntimeComponentsProvider.RUNTIME_PROVIDER,
                 LSMBTreeIOOperationCallbackFactory.INSTANCE, metadataProvider.getStorageProperties()
                         .getBloomFilterFalsePositiveRate(), ExternalDatasetsRegistry.INSTANCE.getAndLockDatasetVersion(
-                        dataset, metadataProvider));
+                        dataset, metadataProvider), !temp);
 
         // Create the out record descriptor, appContext and fileSplitProvider for the files index
         RecordDescriptor outRecDesc = JobGenHelper.mkRecordDescriptor(typeEnv, opSchema, context);
@@ -160,12 +163,14 @@ public class HDFSLookupAdapterFactory implements IControlledAdapterFactory {
             throw new AlgebricksException(e);
         }
 
+        ISearchOperationCallbackFactory searchOpCallbackFactory = temp ? NoOpOperationCallbackFactory.INSTANCE
+                : new SecondaryIndexSearchOperationCallbackFactory();
         // Create the operator
         ExternalLoopkupOperatorDiscriptor op = new ExternalLoopkupOperatorDiscriptor(jobSpec, adapterFactory,
                 outRecDesc, indexDataflowHelperFactory, retainInput, appContext.getIndexLifecycleManagerProvider(),
                 appContext.getStorageManagerInterface(), spPc.first, dataset.getDatasetId(), metadataProvider
-                        .getStorageProperties().getBloomFilterFalsePositiveRate(),
-                new SecondaryIndexSearchOperationCallbackFactory(),retainNull,context.getNullWriterFactory());
+                        .getStorageProperties().getBloomFilterFalsePositiveRate(), searchOpCallbackFactory, retainNull,
+                context.getNullWriterFactory());
 
         // Return value
         return new Pair<IOperatorDescriptor, AlgebricksPartitionConstraint>(op, spPc.second);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.1.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.1.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.1.script.aql
new file mode 100644
index 0000000..323b1cf
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.1.script.aql
@@ -0,0 +1 @@
+create_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.2.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.2.ddl.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.2.ddl.aql
new file mode 100644
index 0000000..b7f6b19
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.2.ddl.aql
@@ -0,0 +1,41 @@
+/* 
+ * Test case Name  : primary_index_only.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : September 25 2013
+ */
+
+drop dataverse recovery if exists;
+create dataverse recovery;
+use dataverse recovery;
+
+/* For raw Fragile data */
+create type FragileTypeRaw as closed {
+  row_id: int32,
+  sid: int32,
+  date: string,
+  day: int32,
+  time: string,
+  bpm: int32,
+  RR: float
+};
+
+/* For cleaned Fragile data */
+create type FragileType as closed {
+  row_id: int32,
+  sid: int32,
+  date: date,
+  day: int32,
+  time: time,
+  bpm: int32,
+  RR: float
+};
+
+/* Create dataset for loading raw Fragile data */
+create temporary dataset Fragile_raw (FragileTypeRaw)
+primary key row_id;
+
+/* Create dataset for cleaned Fragile data */
+create temporary dataset Fragile (FragileType)
+primary key row_id;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.3.update.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.3.update.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.3.update.aql
new file mode 100644
index 0000000..6d0e431
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.3.update.aql
@@ -0,0 +1,11 @@
+/* 
+ * Test case Name  : primary_index_only.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : September 25 2013
+ */
+
+use dataverse recovery;
+
+load dataset Fragile_raw using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="127.0.0.1://../../../../../../asterix-app/data/csv/fragile_01.csv"),("format"="delimited-text"),("delimiter"=",")) pre-sorted;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.4.txneu.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.4.txneu.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.4.txneu.aql
new file mode 100644
index 0000000..3001e9b
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.4.txneu.aql
@@ -0,0 +1,22 @@
+/* 
+ * Test case Name  : primary_index_only.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : September 25 2013
+ */
+
+use dataverse recovery;
+
+/* Load Fragile data from raw dataset into cleaned dataset */
+insert into dataset Fragile (
+  for $t in dataset Fragile_raw
+  return {
+    "row_id": $t.row_id % 28000,
+    "sid": $t.sid,
+    "date": date($t.date),
+    "day": $t.day,
+    "time": parse-time($t.time, "h:m:s"),
+    "bpm": $t.bpm,
+    "RR": $t.RR
+  }
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.5.txnqbc.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.5.txnqbc.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.5.txnqbc.aql
new file mode 100644
index 0000000..e77b008
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.5.txnqbc.aql
@@ -0,0 +1,10 @@
+/* 
+ * Test case Name  : primary_index_only.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : September 25 2013
+ */
+
+use dataverse recovery;
+
+count (for $x in dataset Fragile return $x);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.6.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.6.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.6.script.aql
new file mode 100644
index 0000000..31d37ae
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.6.script.aql
@@ -0,0 +1 @@
+kill_cc_and_nc.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.7.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.7.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.7.script.aql
new file mode 100644
index 0000000..37ef6c0
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.7.script.aql
@@ -0,0 +1 @@
+stop_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.8.txnqar.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.8.txnqar.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.8.txnqar.aql
new file mode 100644
index 0000000..e77b008
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.8.txnqar.aql
@@ -0,0 +1,10 @@
+/* 
+ * Test case Name  : primary_index_only.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : September 25 2013
+ */
+
+use dataverse recovery;
+
+count (for $x in dataset Fragile return $x);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.9.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.9.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.9.script.aql
new file mode 100644
index 0000000..f75dfc9
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_index_only/primary_index_only.9.script.aql
@@ -0,0 +1 @@
+stop_and_delete.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.1.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.1.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.1.script.aql
new file mode 100644
index 0000000..323b1cf
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.1.script.aql
@@ -0,0 +1 @@
+create_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.2.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.2.ddl.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.2.ddl.aql
new file mode 100644
index 0000000..65685ae
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.2.ddl.aql
@@ -0,0 +1,53 @@
+/* 
+ * Test case Name  : primary_plus_default_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+drop dataverse recovery if exists;
+create dataverse recovery;
+use dataverse recovery;
+
+/* For raw Fragile data */
+create type FragileTypeRaw as closed {
+  row_id: int32,
+  sid: int32,
+  date: string,
+  day: int32,
+  time: string,
+  bpm: int32,
+  RR: float,
+  /* new string field and location field*/
+  text: string,
+  location: point,
+  text2: string
+};
+
+/* For cleaned Fragile data */
+create type FragileType as closed {
+  row_id: int32,
+  sid: int32,
+  date: date,
+  day: int32,
+  time: time,
+  bpm: int32,
+  RR: float,
+  
+  /* new string field and location field*/
+  text: string,
+  location: point,
+  text2: string
+};
+
+/* Create dataset for loading raw Fragile data */
+create temporary dataset Fragile_raw (FragileTypeRaw)
+primary key row_id;
+
+/* Create dataset for cleaned Fragile data */
+create temporary dataset Fragile (FragileType)
+primary key row_id;
+
+/* Create default secondary index on dataset clean Fragile */
+create index cfSidIdx on Fragile(sid);
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.3.update.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.3.update.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.3.update.aql
new file mode 100644
index 0000000..5d7d6f2
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.3.update.aql
@@ -0,0 +1,11 @@
+/* 
+ * Test case Name  : primary_plus_default_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+use dataverse recovery;
+
+load dataset Fragile_raw using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="127.0.0.1://../../../../../../asterix-app/data/csv/fragile_02.adm"),("format"="adm")) pre-sorted;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.4.txneu.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.4.txneu.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.4.txneu.aql
new file mode 100644
index 0000000..12fd699
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.4.txneu.aql
@@ -0,0 +1,25 @@
+/* 
+ * Test case Name  : primary_plus_default_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+use dataverse recovery;
+
+/* Load Fragile data from raw dataset into cleaned dataset */
+insert into dataset Fragile (
+  for $t in dataset Fragile_raw
+  return {
+    "row_id": $t.row_id % 28000,
+    "sid": $t.sid,
+    "date": date($t.date),
+    "day": $t.day,
+    "time": parse-time($t.time, "h:m:s"),
+    "bpm": $t.bpm,
+    "RR": $t.RR,
+    "text": $t.text,
+    "location": $t.location,
+    "text2": $t.text2
+  }
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.5.txnqbc.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.5.txnqbc.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.5.txnqbc.aql
new file mode 100644
index 0000000..4d41446
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.5.txnqbc.aql
@@ -0,0 +1,10 @@
+/* 
+ * Test case Name  : primary_plus_default_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Otc 15 2013
+ */
+
+use dataverse recovery;
+
+count (for $x in dataset Fragile where $x.sid=1 return $x);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.6.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.6.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.6.script.aql
new file mode 100644
index 0000000..31d37ae
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.6.script.aql
@@ -0,0 +1 @@
+kill_cc_and_nc.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.7.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.7.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.7.script.aql
new file mode 100644
index 0000000..37ef6c0
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.7.script.aql
@@ -0,0 +1 @@
+stop_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.8.txnqar.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.8.txnqar.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.8.txnqar.aql
new file mode 100644
index 0000000..dd2cde5
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.8.txnqar.aql
@@ -0,0 +1,10 @@
+/* 
+ * Test case Name  : primary_plus_default_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+use dataverse recovery;
+
+count (for $x in dataset Fragile where $x.sid=1 return $x);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.9.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.9.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.9.script.aql
new file mode 100644
index 0000000..f75dfc9
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_default_secondary_index/primary_plus_default_secondary_index.9.script.aql
@@ -0,0 +1 @@
+stop_and_delete.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.1.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.1.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.1.script.aql
new file mode 100644
index 0000000..323b1cf
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.1.script.aql
@@ -0,0 +1 @@
+create_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.2.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.2.ddl.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.2.ddl.aql
new file mode 100644
index 0000000..80fb1ff
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.2.ddl.aql
@@ -0,0 +1,54 @@
+/* 
+ * Test case Name  : primary_plus_keyword_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+drop dataverse recovery if exists;
+create dataverse recovery;
+use dataverse recovery;
+
+/* For raw Fragile data */
+create type FragileTypeRaw as closed {
+  row_id: int32,
+  sid: int32,
+  date: string,
+  day: int32,
+  time: string,
+  bpm: int32,
+  RR: float,
+  /* new string field and location field*/
+  text: string,
+  location: point,
+  text2: string
+  
+};
+
+/* For cleaned Fragile data */
+create type FragileType as closed {
+  row_id: int32,
+  sid: int32,
+  date: date,
+  day: int32,
+  time: time,
+  bpm: int32,
+  RR: float,
+  
+  /* new string field and location field*/
+  text: string,
+  location: point,
+  text2: string
+};
+
+/* Create dataset for loading raw Fragile data */
+create temporary dataset Fragile_raw (FragileTypeRaw)
+primary key row_id;
+
+/* Create dataset for cleaned Fragile data */
+create temporary dataset Fragile (FragileType)
+primary key row_id;
+
+/* Create keyword secondary index on dataset clean Fragile */
+create index cfText on Fragile(text) type keyword;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.3.update.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.3.update.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.3.update.aql
new file mode 100644
index 0000000..9d9757f
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.3.update.aql
@@ -0,0 +1,12 @@
+/* 
+ * Test case Name  : primary_plus_keyword_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+use dataverse recovery;
+
+
+load dataset Fragile_raw using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="127.0.0.1://../../../../../../asterix-app/data/csv/fragile_02.adm"),("format"="adm")) pre-sorted;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.4.txneu.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.4.txneu.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.4.txneu.aql
new file mode 100644
index 0000000..3c38973
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.4.txneu.aql
@@ -0,0 +1,25 @@
+/* 
+ * Test case Name  : primary_plus_keyword_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+use dataverse recovery;
+
+/* Load Fragile data from raw dataset into cleaned dataset */
+insert into dataset Fragile (
+  for $t in dataset Fragile_raw
+  return {
+    "row_id": $t.row_id % 28000,
+    "sid": $t.sid,
+    "date": date($t.date),
+    "day": $t.day,
+    "time": parse-time($t.time, "h:m:s"),
+    "bpm": $t.bpm,
+    "RR": $t.RR,
+    "text": $t.text,
+    "location": $t.location,
+    "text2": $t.text2
+  }
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.5.txnqbc.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.5.txnqbc.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.5.txnqbc.aql
new file mode 100644
index 0000000..f069443
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.5.txnqbc.aql
@@ -0,0 +1,5 @@
+use dataverse recovery;
+
+for $x in dataset Fragile 
+where word-tokens($x.text) ~= word-tokens(" 1 20130417 1")
+return $x.text;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.6.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.6.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.6.script.aql
new file mode 100644
index 0000000..31d37ae
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.6.script.aql
@@ -0,0 +1 @@
+kill_cc_and_nc.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.7.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.7.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.7.script.aql
new file mode 100644
index 0000000..37ef6c0
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.7.script.aql
@@ -0,0 +1 @@
+stop_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.8.txnqar.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.8.txnqar.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.8.txnqar.aql
new file mode 100644
index 0000000..f069443
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.8.txnqar.aql
@@ -0,0 +1,5 @@
+use dataverse recovery;
+
+for $x in dataset Fragile 
+where word-tokens($x.text) ~= word-tokens(" 1 20130417 1")
+return $x.text;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.9.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.9.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.9.script.aql
new file mode 100644
index 0000000..f75dfc9
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.9.script.aql
@@ -0,0 +1 @@
+stop_and_delete.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.1.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.1.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.1.script.aql
new file mode 100644
index 0000000..323b1cf
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.1.script.aql
@@ -0,0 +1 @@
+create_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.2.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.2.ddl.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.2.ddl.aql
new file mode 100644
index 0000000..7f3e1db
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.2.ddl.aql
@@ -0,0 +1,60 @@
+/* 
+ * Test case Name  : primary_plus_keyword_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+drop dataverse recovery if exists;
+create dataverse recovery;
+use dataverse recovery;
+
+/* For raw Fragile data */
+create type FragileTypeRaw as closed {
+  row_id: int32,
+  sid: int32,
+  date: string,
+  day: int32,
+  time: string,
+  bpm: int32,
+  RR: float,
+  /* new string field and location field*/
+  text: string,
+  location: point,
+  text2: string
+  
+};
+
+/* For cleaned Fragile data */
+create type FragileType as closed {
+  row_id: int32,
+  sid: int32,
+  date: date,
+  day: int32,
+  time: time,
+  bpm: int32,
+  RR: float,
+  
+  /* new string field and location field*/
+  text: string,
+  location: point,
+  text2: string
+};
+
+/* Create dataset for loading raw Fragile data */
+create temporary dataset Fragile_raw (FragileTypeRaw)
+primary key row_id;
+
+/* Create dataset for cleaned Fragile data */
+create temporary dataset Fragile (FragileType)
+primary key row_id;
+
+
+/* Create rtree secondary index on dataset clean Fragile */
+create index cfLocation on Fragile(location) type rtree;
+
+create index cfText on Fragile(text) type keyword;
+
+create index cfSidIdx on Fragile(sid);
+
+create index cfText2Ix on Fragile(text2) type ngram(3);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.3.update.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.3.update.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.3.update.aql
new file mode 100644
index 0000000..9d9757f
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.3.update.aql
@@ -0,0 +1,12 @@
+/* 
+ * Test case Name  : primary_plus_keyword_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+use dataverse recovery;
+
+
+load dataset Fragile_raw using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="127.0.0.1://../../../../../../asterix-app/data/csv/fragile_02.adm"),("format"="adm")) pre-sorted;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.4.txneu.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.4.txneu.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.4.txneu.aql
new file mode 100644
index 0000000..3c38973
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.4.txneu.aql
@@ -0,0 +1,25 @@
+/* 
+ * Test case Name  : primary_plus_keyword_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+use dataverse recovery;
+
+/* Load Fragile data from raw dataset into cleaned dataset */
+insert into dataset Fragile (
+  for $t in dataset Fragile_raw
+  return {
+    "row_id": $t.row_id % 28000,
+    "sid": $t.sid,
+    "date": date($t.date),
+    "day": $t.day,
+    "time": parse-time($t.time, "h:m:s"),
+    "bpm": $t.bpm,
+    "RR": $t.RR,
+    "text": $t.text,
+    "location": $t.location,
+    "text2": $t.text2
+  }
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.5.txnqbc.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.5.txnqbc.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.5.txnqbc.aql
new file mode 100644
index 0000000..97935fa
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.5.txnqbc.aql
@@ -0,0 +1,12 @@
+/* 
+ * Test case Name  : primary_plus_keyword_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Otc 15 2013
+ */
+
+
+use dataverse recovery;
+
+count (for $x in dataset Fragile 
+where contains($x.text2, "location") return $x);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.6.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.6.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.6.script.aql
new file mode 100644
index 0000000..31d37ae
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.6.script.aql
@@ -0,0 +1 @@
+kill_cc_and_nc.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.7.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.7.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.7.script.aql
new file mode 100644
index 0000000..37ef6c0
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.7.script.aql
@@ -0,0 +1 @@
+stop_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.8.txnqar.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.8.txnqar.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.8.txnqar.aql
new file mode 100644
index 0000000..5e18be6
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.8.txnqar.aql
@@ -0,0 +1,5 @@
+
+use dataverse recovery;
+
+count (for $x in dataset Fragile 
+where contains($x.text2, "location") return $x);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.9.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.9.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.9.script.aql
new file mode 100644
index 0000000..f75dfc9
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.9.script.aql
@@ -0,0 +1 @@
+stop_and_delete.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.1.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.1.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.1.script.aql
new file mode 100644
index 0000000..323b1cf
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.1.script.aql
@@ -0,0 +1 @@
+create_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.2.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.2.ddl.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.2.ddl.aql
new file mode 100644
index 0000000..7182466
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.2.ddl.aql
@@ -0,0 +1,53 @@
+/* 
+ * Test case Name  : primary_plus_default_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+drop dataverse recovery if exists;
+create dataverse recovery;
+use dataverse recovery;
+
+/* For raw Fragile data */
+create type FragileTypeRaw as closed {
+  row_id: int32,
+  sid: int32,
+  date: string,
+  day: int32,
+  time: string,
+  bpm: int32,
+  RR: float,
+  /* new string field and location field*/
+  text: string,
+  location: point,
+  text2: string
+};
+
+/* For cleaned Fragile data */
+create type FragileType as closed {
+  row_id: int32,
+  sid: int32,
+  date: date,
+  day: int32,
+  time: time,
+  bpm: int32,
+  RR: float,
+  
+  /* new string field and location field*/
+  text: string,
+  location: point,
+  text2: string
+};
+
+/* Create dataset for loading raw Fragile data */
+create temporary dataset Fragile_raw (FragileTypeRaw)
+primary key row_id;
+
+/* Create dataset for cleaned Fragile data */
+create temporary dataset Fragile (FragileType)
+primary key row_id;
+
+/* Create default secondary index on dataset clean Fragile */
+create index cfText2Ix on Fragile(text2) type ngram(3);
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.3.update.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.3.update.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.3.update.aql
new file mode 100644
index 0000000..5d7d6f2
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.3.update.aql
@@ -0,0 +1,11 @@
+/* 
+ * Test case Name  : primary_plus_default_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+use dataverse recovery;
+
+load dataset Fragile_raw using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="127.0.0.1://../../../../../../asterix-app/data/csv/fragile_02.adm"),("format"="adm")) pre-sorted;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.4.txneu.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.4.txneu.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.4.txneu.aql
new file mode 100644
index 0000000..12fd699
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.4.txneu.aql
@@ -0,0 +1,25 @@
+/* 
+ * Test case Name  : primary_plus_default_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+use dataverse recovery;
+
+/* Load Fragile data from raw dataset into cleaned dataset */
+insert into dataset Fragile (
+  for $t in dataset Fragile_raw
+  return {
+    "row_id": $t.row_id % 28000,
+    "sid": $t.sid,
+    "date": date($t.date),
+    "day": $t.day,
+    "time": parse-time($t.time, "h:m:s"),
+    "bpm": $t.bpm,
+    "RR": $t.RR,
+    "text": $t.text,
+    "location": $t.location,
+    "text2": $t.text2
+  }
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.5.txnqbc.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.5.txnqbc.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.5.txnqbc.aql
new file mode 100644
index 0000000..434e8b0
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.5.txnqbc.aql
@@ -0,0 +1,11 @@
+/* 
+ * Test case Name  : primary_plus_default_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Otc 15 2013
+ */
+
+use dataverse recovery;
+
+count (for $x in dataset Fragile 
+where contains($x.text2, "location") return $x);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.6.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.6.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.6.script.aql
new file mode 100644
index 0000000..31d37ae
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.6.script.aql
@@ -0,0 +1 @@
+kill_cc_and_nc.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.7.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.7.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.7.script.aql
new file mode 100644
index 0000000..37ef6c0
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.7.script.aql
@@ -0,0 +1 @@
+stop_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.8.txnqar.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.8.txnqar.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.8.txnqar.aql
new file mode 100644
index 0000000..21a5d28
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.8.txnqar.aql
@@ -0,0 +1,11 @@
+/* 
+ * Test case Name  : primary_plus_default_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+use dataverse recovery;
+
+count (for $x in dataset Fragile 
+where contains($x.text2, "location") return $x);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.9.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.9.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.9.script.aql
new file mode 100644
index 0000000..f75dfc9
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_ngram_index/primary_plus_ngram_index.9.script.aql
@@ -0,0 +1 @@
+stop_and_delete.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.1.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.1.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.1.script.aql
new file mode 100644
index 0000000..323b1cf
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.1.script.aql
@@ -0,0 +1 @@
+create_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.2.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.2.ddl.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.2.ddl.aql
new file mode 100644
index 0000000..21c17bc
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.2.ddl.aql
@@ -0,0 +1,54 @@
+/* 
+ * Test case Name  : primary_plus_keyword_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+drop dataverse recovery if exists;
+create dataverse recovery;
+use dataverse recovery;
+
+/* For raw Fragile data */
+create type FragileTypeRaw as closed {
+  row_id: int32,
+  sid: int32,
+  date: string,
+  day: int32,
+  time: string,
+  bpm: int32,
+  RR: float,
+  /* new string field and location field*/
+  text: string,
+  location: point,
+  text2: string
+  
+};
+
+/* For cleaned Fragile data */
+create type FragileType as closed {
+  row_id: int32,
+  sid: int32,
+  date: date,
+  day: int32,
+  time: time,
+  bpm: int32,
+  RR: float,
+  
+  /* new string field and location field*/
+  text: string,
+  location: point,
+  text2: string
+};
+
+/* Create dataset for loading raw Fragile data */
+create temporary dataset Fragile_raw (FragileTypeRaw)
+primary key row_id;
+
+/* Create dataset for cleaned Fragile data */
+create temporary dataset Fragile (FragileType)
+primary key row_id;
+
+
+/* Create rtree secondary index on dataset clean Fragile */
+create index cfLocation on Fragile(location) type rtree;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.3.update.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.3.update.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.3.update.aql
new file mode 100644
index 0000000..9d9757f
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.3.update.aql
@@ -0,0 +1,12 @@
+/* 
+ * Test case Name  : primary_plus_keyword_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+use dataverse recovery;
+
+
+load dataset Fragile_raw using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="127.0.0.1://../../../../../../asterix-app/data/csv/fragile_02.adm"),("format"="adm")) pre-sorted;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.4.txneu.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.4.txneu.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.4.txneu.aql
new file mode 100644
index 0000000..3c38973
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.4.txneu.aql
@@ -0,0 +1,25 @@
+/* 
+ * Test case Name  : primary_plus_keyword_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+use dataverse recovery;
+
+/* Load Fragile data from raw dataset into cleaned dataset */
+insert into dataset Fragile (
+  for $t in dataset Fragile_raw
+  return {
+    "row_id": $t.row_id % 28000,
+    "sid": $t.sid,
+    "date": date($t.date),
+    "day": $t.day,
+    "time": parse-time($t.time, "h:m:s"),
+    "bpm": $t.bpm,
+    "RR": $t.RR,
+    "text": $t.text,
+    "location": $t.location,
+    "text2": $t.text2
+  }
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.5.txnqbc.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.5.txnqbc.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.5.txnqbc.aql
new file mode 100644
index 0000000..9189b28
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.5.txnqbc.aql
@@ -0,0 +1,5 @@
+use dataverse recovery;
+
+count (for $x in dataset Fragile where 
+spatial-intersect($x.location, create-polygon([0.0,0.0, 2.0,2.0, 0.0,2.0, 2.0,0.0]))
+return $x);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.6.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.6.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.6.script.aql
new file mode 100644
index 0000000..31d37ae
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.6.script.aql
@@ -0,0 +1 @@
+kill_cc_and_nc.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.7.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.7.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.7.script.aql
new file mode 100644
index 0000000..37ef6c0
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.7.script.aql
@@ -0,0 +1 @@
+stop_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.8.txnqar.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.8.txnqar.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.8.txnqar.aql
new file mode 100644
index 0000000..9189b28
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.8.txnqar.aql
@@ -0,0 +1,5 @@
+use dataverse recovery;
+
+count (for $x in dataset Fragile where 
+spatial-intersect($x.location, create-polygon([0.0,0.0, 2.0,2.0, 0.0,2.0, 2.0,0.0]))
+return $x);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.9.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.9.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.9.script.aql
new file mode 100644
index 0000000..f75dfc9
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recover_after_abort/temp_primary_plus_rtree_index/primary_plus_rtree_index.9.script.aql
@@ -0,0 +1 @@
+stop_and_delete.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.1.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.1.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.1.script.aql
new file mode 100644
index 0000000..323b1cf
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.1.script.aql
@@ -0,0 +1 @@
+create_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.2.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.2.ddl.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.2.ddl.aql
new file mode 100644
index 0000000..ab9b51e
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.2.ddl.aql
@@ -0,0 +1,19 @@
+/* 
+ * Test case Name  : dataverse_recovery
+ * Description     :    
+ * Expected Result : 
+ * Date            : 
+ */
+
+drop dataverse SampleDV if exists;
+create dataverse SampleDV;
+
+use dataverse SampleDV;
+
+create type SampleType as open {
+	id: int32,
+	text: string
+}
+
+create temporary dataset SampleDS(SampleType)
+primary key id;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.3.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.3.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.3.script.aql
new file mode 100644
index 0000000..31d37ae
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.3.script.aql
@@ -0,0 +1 @@
+kill_cc_and_nc.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.4.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.4.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.4.script.aql
new file mode 100644
index 0000000..3ba1dc0
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.4.script.aql
@@ -0,0 +1 @@
+stop_and_start.sh

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.5.errddl.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.5.errddl.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.5.errddl.aql
new file mode 100644
index 0000000..da254c2
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.5.errddl.aql
@@ -0,0 +1,2 @@
+use dataverse SampleDV;
+drop dataset SampleDS;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.6.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.6.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.6.script.aql
new file mode 100644
index 0000000..10e1a51
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_dataset_recovery/dataset_recovery.6.script.aql
@@ -0,0 +1 @@
+stop_and_delete.sh

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.1.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.1.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.1.script.aql
new file mode 100644
index 0000000..323b1cf
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.1.script.aql
@@ -0,0 +1 @@
+create_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.2.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.2.ddl.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.2.ddl.aql
new file mode 100644
index 0000000..b7f6b19
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.2.ddl.aql
@@ -0,0 +1,41 @@
+/* 
+ * Test case Name  : primary_index_only.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : September 25 2013
+ */
+
+drop dataverse recovery if exists;
+create dataverse recovery;
+use dataverse recovery;
+
+/* For raw Fragile data */
+create type FragileTypeRaw as closed {
+  row_id: int32,
+  sid: int32,
+  date: string,
+  day: int32,
+  time: string,
+  bpm: int32,
+  RR: float
+};
+
+/* For cleaned Fragile data */
+create type FragileType as closed {
+  row_id: int32,
+  sid: int32,
+  date: date,
+  day: int32,
+  time: time,
+  bpm: int32,
+  RR: float
+};
+
+/* Create dataset for loading raw Fragile data */
+create temporary dataset Fragile_raw (FragileTypeRaw)
+primary key row_id;
+
+/* Create dataset for cleaned Fragile data */
+create temporary dataset Fragile (FragileType)
+primary key row_id;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.3.update.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.3.update.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.3.update.aql
new file mode 100644
index 0000000..6d0e431
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.3.update.aql
@@ -0,0 +1,11 @@
+/* 
+ * Test case Name  : primary_index_only.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : September 25 2013
+ */
+
+use dataverse recovery;
+
+load dataset Fragile_raw using "edu.uci.ics.asterix.external.dataset.adapter.NCFileSystemAdapter"
+(("path"="127.0.0.1://../../../../../../asterix-app/data/csv/fragile_01.csv"),("format"="delimited-text"),("delimiter"=",")) pre-sorted;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.4.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.4.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.4.script.aql
new file mode 100644
index 0000000..31d37ae
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.4.script.aql
@@ -0,0 +1 @@
+kill_cc_and_nc.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.5.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.5.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.5.script.aql
new file mode 100644
index 0000000..3ba1dc0
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.5.script.aql
@@ -0,0 +1 @@
+stop_and_start.sh

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.6.update.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.6.update.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.6.update.aql
new file mode 100644
index 0000000..a5e94d2
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.6.update.aql
@@ -0,0 +1,5 @@
+use dataverse recovery;
+
+delete $r from dataset Fragile_raw 
+  where $r.row_id % 2 = 1
+;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.7.query.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.7.query.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.7.query.aql
new file mode 100644
index 0000000..a63aee2
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.7.query.aql
@@ -0,0 +1,11 @@
+/* 
+ * Test case Name  : primary_index_only.aql
+ * Description     : Check that abort from duplicate key exception works and crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : September 25 2013
+ */
+
+use dataverse recovery;
+
+count (for $x in dataset Fragile_raw return $x);
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.8.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.8.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.8.script.aql
new file mode 100644
index 0000000..f75dfc9
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.8.script.aql
@@ -0,0 +1 @@
+stop_and_delete.sh
\ No newline at end of file



Mime
View raw message