asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject [03/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:44 GMT
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_after_recovery.1.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_after_recovery.1.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_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_insert_after_recovery/insert_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_insert_after_recovery/insert_after_recovery.2.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_after_recovery.2.ddl.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_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_insert_after_recovery/insert_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_insert_after_recovery/insert_after_recovery.3.update.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_after_recovery.3.update.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_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_insert_after_recovery/insert_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_insert_after_recovery/insert_after_recovery.4.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_after_recovery.4.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_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_insert_after_recovery/insert_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_insert_after_recovery/insert_after_recovery.5.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_after_recovery.5.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_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_insert_after_recovery/insert_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_insert_after_recovery/insert_after_recovery.6.update.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_after_recovery.6.update.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_after_recovery.6.update.aql
new file mode 100644
index 0000000..26d998d
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_after_recovery.6.update.aql
@@ -0,0 +1,15 @@
+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,
+    "sid": $t.sid,
+    "date": date($t.date),
+    "day": $t.day,
+    "time": parse-time($t.time, "h:m:s"),
+    "bpm": $t.bpm,
+    "RR": $t.RR
+  }
+);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_after_recovery.7.query.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_after_recovery.7.query.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_after_recovery.7.query.aql
new file mode 100644
index 0000000..f8ed3d0
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_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 return $x);
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_after_recovery.8.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_after_recovery.8.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_insert_after_recovery/insert_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_insert_after_recovery/insert_after_recovery.8.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_load_after_recovery/load_after_recovery.1.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_load_after_recovery/load_after_recovery.1.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_load_after_recovery/load_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_load_after_recovery/load_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_load_after_recovery/load_after_recovery.2.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_load_after_recovery/load_after_recovery.2.ddl.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_load_after_recovery/load_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_load_after_recovery/load_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_load_after_recovery/load_after_recovery.3.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_load_after_recovery/load_after_recovery.3.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_load_after_recovery/load_after_recovery.3.script.aql
new file mode 100644
index 0000000..31d37ae
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_load_after_recovery/load_after_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_load_after_recovery/load_after_recovery.4.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_load_after_recovery/load_after_recovery.4.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_load_after_recovery/load_after_recovery.4.script.aql
new file mode 100644
index 0000000..37ef6c0
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_load_after_recovery/load_after_recovery.4.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/recovery_ddl/temp_load_after_recovery/load_after_recovery.5.update.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_load_after_recovery/load_after_recovery.5.update.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_load_after_recovery/load_after_recovery.5.update.aql
new file mode 100644
index 0000000..6d0e431
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_load_after_recovery/load_after_recovery.5.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_load_after_recovery/load_after_recovery.6.query.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_load_after_recovery/load_after_recovery.6.query.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_load_after_recovery/load_after_recovery.6.query.aql
new file mode 100644
index 0000000..fcd9e05
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_load_after_recovery/load_after_recovery.6.query.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_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_load_after_recovery/load_after_recovery.7.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_load_after_recovery/load_after_recovery.7.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_load_after_recovery/load_after_recovery.7.script.aql
new file mode 100644
index 0000000..f75dfc9
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_load_after_recovery/load_after_recovery.7.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_secondary_index_recovery/secondary_index_recovery.1.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_secondary_index_recovery/secondary_index_recovery.1.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_secondary_index_recovery/secondary_index_recovery.1.script.aql
new file mode 100644
index 0000000..323b1cf
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_secondary_index_recovery/secondary_index_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_secondary_index_recovery/secondary_index_recovery.2.ddl.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_secondary_index_recovery/secondary_index_recovery.2.ddl.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_secondary_index_recovery/secondary_index_recovery.2.ddl.aql
new file mode 100644
index 0000000..28f3cf8
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_secondary_index_recovery/secondary_index_recovery.2.ddl.aql
@@ -0,0 +1,21 @@
+/* 
+ * 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;
+
+create index SampleDSix on SampleDS(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/recovery_ddl/temp_secondary_index_recovery/secondary_index_recovery.3.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_secondary_index_recovery/secondary_index_recovery.3.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_secondary_index_recovery/secondary_index_recovery.3.script.aql
new file mode 100644
index 0000000..31d37ae
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_secondary_index_recovery/secondary_index_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_secondary_index_recovery/secondary_index_recovery.4.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_secondary_index_recovery/secondary_index_recovery.4.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_secondary_index_recovery/secondary_index_recovery.4.script.aql
new file mode 100644
index 0000000..3ba1dc0
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_secondary_index_recovery/secondary_index_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_secondary_index_recovery/secondary_index_recovery.5.errddl.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_secondary_index_recovery/secondary_index_recovery.5.errddl.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_secondary_index_recovery/secondary_index_recovery.5.errddl.aql
new file mode 100644
index 0000000..d765b16
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_secondary_index_recovery/secondary_index_recovery.5.errddl.aql
@@ -0,0 +1,2 @@
+use dataverse SampleDV;
+drop index SampleDS.SampleDSix;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_secondary_index_recovery/secondary_index_recovery.6.script.aql
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_secondary_index_recovery/secondary_index_recovery.6.script.aql b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_secondary_index_recovery/secondary_index_recovery.6.script.aql
new file mode 100644
index 0000000..10e1a51
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/queries/recovery_ddl/temp_secondary_index_recovery/secondary_index_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/results/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.1.adm
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/results/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.1.adm b/asterix-installer/src/test/resources/transactionts/results/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.1.adm
new file mode 100644
index 0000000..5c1b51d
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/results/recovery_ddl/temp_delete_after_recovery/delete_after_recovery.1.adm
@@ -0,0 +1,2 @@
+[ 129088
+ ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/results/recovery_ddl/temp_insert_after_recovery/insert_after_recovery.1.adm
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/results/recovery_ddl/temp_insert_after_recovery/insert_after_recovery.1.adm b/asterix-installer/src/test/resources/transactionts/results/recovery_ddl/temp_insert_after_recovery/insert_after_recovery.1.adm
new file mode 100644
index 0000000..de0b6c2
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/results/recovery_ddl/temp_insert_after_recovery/insert_after_recovery.1.adm
@@ -0,0 +1,2 @@
+[ 258176
+ ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/results/recovery_ddl/temp_load_after_recovery/load_after_recovery.1.adm
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/results/recovery_ddl/temp_load_after_recovery/load_after_recovery.1.adm b/asterix-installer/src/test/resources/transactionts/results/recovery_ddl/temp_load_after_recovery/load_after_recovery.1.adm
new file mode 100644
index 0000000..de0b6c2
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/results/recovery_ddl/temp_load_after_recovery/load_after_recovery.1.adm
@@ -0,0 +1,2 @@
+[ 258176
+ ]

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/create_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/create_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/create_and_start.sh
new file mode 100755
index 0000000..945f01d
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/create_and_start.sh
@@ -0,0 +1 @@
+$MANAGIX_HOME/bin/managix create -n nc1 -c $MANAGIX_HOME/clusters/local/local.xml;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/kill_cc_and_nc.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/kill_cc_and_nc.sh
new file mode 100755
index 0000000..096d7df
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/kill_cc_and_nc.sh
@@ -0,0 +1 @@
+jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/stop_and_delete.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/stop_and_delete.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/stop_and_delete.sh
new file mode 100755
index 0000000..d7deea3
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/stop_and_delete.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix delete -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/stop_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/stop_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/stop_and_start.sh
new file mode 100755
index 0000000..7855938
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_index_only/stop_and_start.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix start -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/create_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/create_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/create_and_start.sh
new file mode 100755
index 0000000..945f01d
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/create_and_start.sh
@@ -0,0 +1 @@
+$MANAGIX_HOME/bin/managix create -n nc1 -c $MANAGIX_HOME/clusters/local/local.xml;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/kill_cc_and_nc.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/kill_cc_and_nc.sh
new file mode 100755
index 0000000..096d7df
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/kill_cc_and_nc.sh
@@ -0,0 +1 @@
+jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/stop_and_delete.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/stop_and_delete.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/stop_and_delete.sh
new file mode 100755
index 0000000..d7deea3
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/stop_and_delete.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix delete -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/stop_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/stop_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/stop_and_start.sh
new file mode 100755
index 0000000..7855938
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_default_secondary_index/stop_and_start.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix start -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/create_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/create_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/create_and_start.sh
new file mode 100755
index 0000000..945f01d
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/create_and_start.sh
@@ -0,0 +1 @@
+$MANAGIX_HOME/bin/managix create -n nc1 -c $MANAGIX_HOME/clusters/local/local.xml;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/kill_cc_and_nc.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/kill_cc_and_nc.sh
new file mode 100755
index 0000000..096d7df
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/kill_cc_and_nc.sh
@@ -0,0 +1 @@
+jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/stop_and_delete.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/stop_and_delete.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/stop_and_delete.sh
new file mode 100755
index 0000000..d7deea3
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/stop_and_delete.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix delete -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/stop_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/stop_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/stop_and_start.sh
new file mode 100755
index 0000000..7855938
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_keyword_secondary_index/stop_and_start.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix start -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/create_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/create_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/create_and_start.sh
new file mode 100755
index 0000000..945f01d
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/create_and_start.sh
@@ -0,0 +1 @@
+$MANAGIX_HOME/bin/managix create -n nc1 -c $MANAGIX_HOME/clusters/local/local.xml;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/kill_cc_and_nc.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/kill_cc_and_nc.sh
new file mode 100755
index 0000000..096d7df
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/kill_cc_and_nc.sh
@@ -0,0 +1 @@
+jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/stop_and_delete.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/stop_and_delete.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/stop_and_delete.sh
new file mode 100755
index 0000000..d7deea3
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/stop_and_delete.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix delete -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/stop_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/stop_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/stop_and_start.sh
new file mode 100755
index 0000000..7855938
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_multiple_secondary_indices/stop_and_start.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix start -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/create_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/create_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/create_and_start.sh
new file mode 100755
index 0000000..945f01d
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/create_and_start.sh
@@ -0,0 +1 @@
+$MANAGIX_HOME/bin/managix create -n nc1 -c $MANAGIX_HOME/clusters/local/local.xml;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/kill_cc_and_nc.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/kill_cc_and_nc.sh
new file mode 100755
index 0000000..096d7df
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/kill_cc_and_nc.sh
@@ -0,0 +1 @@
+jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/stop_and_delete.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/stop_and_delete.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/stop_and_delete.sh
new file mode 100755
index 0000000..d7deea3
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/stop_and_delete.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix delete -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/stop_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/stop_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/stop_and_start.sh
new file mode 100755
index 0000000..7855938
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_ngram_index/stop_and_start.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix start -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/create_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/create_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/create_and_start.sh
new file mode 100755
index 0000000..945f01d
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/create_and_start.sh
@@ -0,0 +1 @@
+$MANAGIX_HOME/bin/managix create -n nc1 -c $MANAGIX_HOME/clusters/local/local.xml;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/kill_cc_and_nc.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/kill_cc_and_nc.sh
new file mode 100755
index 0000000..096d7df
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/kill_cc_and_nc.sh
@@ -0,0 +1 @@
+jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/stop_and_delete.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/stop_and_delete.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/stop_and_delete.sh
new file mode 100755
index 0000000..d7deea3
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/stop_and_delete.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix delete -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/stop_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/stop_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/stop_and_start.sh
new file mode 100755
index 0000000..7855938
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recover_after_abort/temp_primary_plus_rtree_index/stop_and_start.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix start -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/create_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/create_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/create_and_start.sh
new file mode 100755
index 0000000..945f01d
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/create_and_start.sh
@@ -0,0 +1 @@
+$MANAGIX_HOME/bin/managix create -n nc1 -c $MANAGIX_HOME/clusters/local/local.xml;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/kill_cc_and_nc.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/kill_cc_and_nc.sh
new file mode 100755
index 0000000..096d7df
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/kill_cc_and_nc.sh
@@ -0,0 +1 @@
+jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/stop_and_delete.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/stop_and_delete.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/stop_and_delete.sh
new file mode 100755
index 0000000..d7deea3
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/stop_and_delete.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix delete -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/stop_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/stop_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/stop_and_start.sh
new file mode 100755
index 0000000..7855938
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_dataset_recovery/stop_and_start.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix start -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/create_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/create_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/create_and_start.sh
new file mode 100755
index 0000000..945f01d
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/create_and_start.sh
@@ -0,0 +1 @@
+$MANAGIX_HOME/bin/managix create -n nc1 -c $MANAGIX_HOME/clusters/local/local.xml;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/kill_cc_and_nc.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/kill_cc_and_nc.sh
new file mode 100755
index 0000000..096d7df
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/kill_cc_and_nc.sh
@@ -0,0 +1 @@
+jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/stop_and_delete.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/stop_and_delete.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/stop_and_delete.sh
new file mode 100755
index 0000000..d7deea3
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/stop_and_delete.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix delete -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/stop_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/stop_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/stop_and_start.sh
new file mode 100755
index 0000000..7855938
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_delete_after_recovery/stop_and_start.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix start -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/create_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/create_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/create_and_start.sh
new file mode 100755
index 0000000..945f01d
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/create_and_start.sh
@@ -0,0 +1 @@
+$MANAGIX_HOME/bin/managix create -n nc1 -c $MANAGIX_HOME/clusters/local/local.xml;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/kill_cc_and_nc.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/kill_cc_and_nc.sh
new file mode 100755
index 0000000..096d7df
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/kill_cc_and_nc.sh
@@ -0,0 +1 @@
+jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/stop_and_delete.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/stop_and_delete.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/stop_and_delete.sh
new file mode 100755
index 0000000..d7deea3
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/stop_and_delete.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix delete -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/stop_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/stop_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/stop_and_start.sh
new file mode 100755
index 0000000..7855938
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_insert_after_recovery/stop_and_start.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix start -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/create_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/create_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/create_and_start.sh
new file mode 100755
index 0000000..945f01d
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/create_and_start.sh
@@ -0,0 +1 @@
+$MANAGIX_HOME/bin/managix create -n nc1 -c $MANAGIX_HOME/clusters/local/local.xml;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/kill_cc_and_nc.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/kill_cc_and_nc.sh
new file mode 100755
index 0000000..096d7df
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/kill_cc_and_nc.sh
@@ -0,0 +1 @@
+jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/stop_and_delete.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/stop_and_delete.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/stop_and_delete.sh
new file mode 100755
index 0000000..d7deea3
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/stop_and_delete.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix delete -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/stop_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/stop_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/stop_and_start.sh
new file mode 100755
index 0000000..7855938
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_load_after_recovery/stop_and_start.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix start -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/create_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/create_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/create_and_start.sh
new file mode 100755
index 0000000..945f01d
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/create_and_start.sh
@@ -0,0 +1 @@
+$MANAGIX_HOME/bin/managix create -n nc1 -c $MANAGIX_HOME/clusters/local/local.xml;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/kill_cc_and_nc.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/kill_cc_and_nc.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/kill_cc_and_nc.sh
new file mode 100755
index 0000000..096d7df
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/kill_cc_and_nc.sh
@@ -0,0 +1 @@
+jps | awk '{if ($2 == "NCDriver" || $2 == "CCDriver") print $1;}' | xargs -n 1 kill -9

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/stop_and_delete.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/stop_and_delete.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/stop_and_delete.sh
new file mode 100755
index 0000000..d7deea3
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/stop_and_delete.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix delete -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/stop_and_start.sh
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/stop_and_start.sh b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/stop_and_start.sh
new file mode 100755
index 0000000..7855938
--- /dev/null
+++ b/asterix-installer/src/test/resources/transactionts/scripts/recovery_ddl/temp_secondary_index_recovery/stop_and_start.sh
@@ -0,0 +1,3 @@
+$MANAGIX_HOME/bin/managix stop -n nc1;
+$MANAGIX_HOME/bin/managix start -n nc1;
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-installer/src/test/resources/transactionts/testsuite.xml
----------------------------------------------------------------------
diff --git a/asterix-installer/src/test/resources/transactionts/testsuite.xml b/asterix-installer/src/test/resources/transactionts/testsuite.xml
index f2bd2b5..a757f5e 100644
--- a/asterix-installer/src/test/resources/transactionts/testsuite.xml
+++ b/asterix-installer/src/test/resources/transactionts/testsuite.xml
@@ -13,7 +13,7 @@
  ! limitations under the License.
  !-->
 <test-suite xmlns="urn:xml.testframework.asterix.ics.uci.edu" ResultOffsetPath="results" QueryOffsetPath="queries" QueryFileExtension=".aql">
- 
+
   <test-group name="recover_after_abort">
 
     <test-case FilePath="recover_after_abort">
@@ -33,13 +33,13 @@
         <output-dir compare="Text">primary_plus_rtree_index</output-dir>
       </compilation-unit>
     </test-case>
-     
+
     <test-case FilePath="recover_after_abort">
       <compilation-unit name="primary_plus_keyword_secondary_index">
         <output-dir compare="Text">primary_plus_keyword_secondary_index</output-dir>
       </compilation-unit>
     </test-case>
-      
+
     <test-case FilePath="recover_after_abort">
       <compilation-unit name="primary_plus_ngram_index">
         <output-dir compare="Text">primary_plus_ngram_index</output-dir>
@@ -52,10 +52,51 @@
       </compilation-unit>
     </test-case>
   
+    <test-case FilePath="recover_after_abort">
+      <compilation-unit name="temp_primary_index_only">
+        <output-dir compare="Text">primary_index_only</output-dir>
+        <expected-error>edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException</expected-error>
+      </compilation-unit>
+    </test-case>
+
+    <test-case FilePath="recover_after_abort">
+      <compilation-unit name="temp_primary_plus_default_secondary_index">
+        <output-dir compare="Text">primary_plus_default_secondary_index</output-dir>
+        <expected-error>edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException</expected-error>
+      </compilation-unit>
+    </test-case>
+
+    <test-case FilePath="recover_after_abort">
+      <compilation-unit name="temp_primary_plus_rtree_index">
+        <output-dir compare="Text">primary_plus_rtree_index</output-dir>
+        <expected-error>edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException</expected-error>
+      </compilation-unit>
+    </test-case>
+
+    <test-case FilePath="recover_after_abort">
+      <compilation-unit name="temp_primary_plus_keyword_secondary_index">
+        <output-dir compare="Text">primary_plus_keyword_secondary_index</output-dir>
+        <expected-error>edu.uci.ics.hyracks.api.exceptions.HyracksDataException</expected-error>
+      </compilation-unit>
+    </test-case>
+      
+    <test-case FilePath="recover_after_abort">
+      <compilation-unit name="temp_primary_plus_ngram_index">
+        <output-dir compare="Text">primary_plus_ngram_index</output-dir>
+        <expected-error>edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException</expected-error>
+      </compilation-unit>
+    </test-case>
+
+    <test-case FilePath="recover_after_abort">
+      <compilation-unit name="primary_plus_multiple_secondary_indices">
+        <output-dir compare="Text">primary_plus_multiple_secondary_indices</output-dir>
+        <expected-error>edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException</expected-error>
+      </compilation-unit>
+    </test-case>
  </test-group>
 
  <test-group name="recovery_ddl">
-    
+
     <test-case FilePath="recovery_ddl">
       <compilation-unit name="dataverse_recovery">
         <output-dir compare="Text">dataverse_recovery</output-dir>
@@ -67,25 +108,25 @@
         <output-dir compare="Text">datatype_recovery</output-dir>
       </compilation-unit>
     </test-case>
-    
+
     <test-case FilePath="recovery_ddl">
       <compilation-unit name="dataset_recovery">
         <output-dir compare="Text">dataset_recovery</output-dir>
       </compilation-unit>
     </test-case>
-    
+
     <test-case FilePath="recovery_ddl">
       <compilation-unit name="secondary_index_recovery">
         <output-dir compare="Text">secondary_index_recovery</output-dir>
       </compilation-unit>
     </test-case>
-  
+
     <test-case FilePath="recovery_ddl">
       <compilation-unit name="load_after_recovery">
         <output-dir compare="Text">load_after_recovery</output-dir>
       </compilation-unit>
     </test-case>
-    
+
     <test-case FilePath="recovery_ddl">
       <compilation-unit name="insert_after_recovery">
         <output-dir compare="Text">insert_after_recovery</output-dir>
@@ -97,14 +138,48 @@
         <output-dir compare="Text">delete_after_recovery</output-dir>
       </compilation-unit>
     </test-case>
-    
+
     <test-case FilePath="recovery_ddl">
       <compilation-unit name="function_recovery">
         <output-dir compare="Text">function_recovery</output-dir>
       </compilation-unit>
     </test-case>
+
+    <test-case FilePath="recovery_ddl">
+      <compilation-unit name="temp_dataset_recovery">
+        <output-dir compare="Text">dataset_recovery</output-dir>
+        <expected-error>edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException</expected-error>
+      </compilation-unit>
+    </test-case>
+
+    <test-case FilePath="recovery_ddl">
+      <compilation-unit name="temp_delete_after_recovery">
+        <output-dir compare="Text">delete_after_recovery</output-dir>
+        <expected-error>edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException</expected-error>
+      </compilation-unit>
+    </test-case>
+
+    <test-case FilePath="recovery_ddl">
+      <compilation-unit name="temp_insert_after_recovery">
+        <output-dir compare="Text">insert_after_recovery</output-dir>
+        <expected-error>edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException</expected-error>
+      </compilation-unit>
+    </test-case>
+
+    <test-case FilePath="recovery_ddl">
+      <compilation-unit name="temp_load_after_recovery">
+        <output-dir compare="Text">load_after_recovery</output-dir>
+        <expected-error>edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException</expected-error>
+      </compilation-unit>
+    </test-case>
+
+    <test-case FilePath="recovery_ddl">
+      <compilation-unit name="temp_secondary_index_recovery">
+        <output-dir compare="Text">secondary_index_recovery</output-dir>
+        <expected-error>edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException</expected-error>
+      </compilation-unit>
+    </test-case>
  
   </test-group>
 
-
 </test-suite>

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/GarbageCollector.java
----------------------------------------------------------------------
diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/GarbageCollector.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/GarbageCollector.java
new file mode 100644
index 0000000..3f1cbca
--- /dev/null
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/GarbageCollector.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2009-2013 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package edu.uci.ics.asterix.metadata;
+
+/**
+ * Periodically recycle temporary datasets.
+ * 
+ * @author yingyib
+ */
+public class GarbageCollector implements Runnable {
+
+    private static long CLEANUP_PERIOD = 3600 * 24;
+
+    @Override
+    public void run() {
+        try {
+            synchronized (this) {
+                this.wait(CLEANUP_PERIOD);
+            }
+            MetadataManager.INSTANCE.cleanupTempDatasets();
+        } catch (Exception e) {
+            // Prints the stack trace to log.
+            e.printStackTrace();
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/IDatasetDetails.java
----------------------------------------------------------------------
diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/IDatasetDetails.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/IDatasetDetails.java
index 3ed94de..17c0302 100644
--- a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/IDatasetDetails.java
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/IDatasetDetails.java
@@ -24,8 +24,33 @@ import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 public interface IDatasetDetails extends Serializable {
 
     public DatasetType getDatasetType();
+
     public String getNodeGroupName();
+
     public void writeDatasetDetailsRecordType(DataOutput out) throws HyracksDataException;
+
     public String getCompactionPolicy();
+
     public Map<String, String> getCompactionPolicyProperties();
+
+    /**
+     * @return if the dataset is a temporary dataset.
+     *         Here is a summary of temporary datasets:
+     *         1. Different from a persistent dataset, reads and writes over a temporary dataset do not require any lock.
+     *         Writes over a temporary dataset do not generate any write-ahead update and commit log but generate
+     *         flush log and job commit log.
+     *         2. A temporary dataset can only be an internal dataset, stored in partitioned LSM-Btrees.
+     *         3. All secondary indexes for persistent datasets are supported for temporary datasets.
+     *         4. A temporary dataset will be automatically garbage collected if it is not active in the past 30 days.
+     *         A temporary dataset could be used for the following scenarios:
+     *         1. A data scientist wants to run some one-time data analysis queries over a dataset that s/he pre-processed
+     *         and the dataset is only used by her/himself in an one-query-at-a-time manner.
+     *         2. Articulate AQL with external systems such as Pregelix/IMRU/Spark. A user can first run an AQL
+     *         query to populate a temporary dataset, then kick off an external runtime to read this dataset,
+     *         dump the results of the external runtime to yet-another-temporary dataset, and finally run yet-another AQL
+     *         over the second temporary dataset.
+     */
+    public boolean isTemp();
+
+    public long getLastAccessTime();
 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataCache.java
----------------------------------------------------------------------
diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataCache.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataCache.java
index c36726b..6eb60f0 100644
--- a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataCache.java
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataCache.java
@@ -17,9 +17,12 @@ package edu.uci.ics.asterix.metadata;
 
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
+import edu.uci.ics.asterix.common.config.DatasetConfig.DatasetType;
+import edu.uci.ics.asterix.common.config.DatasetConfig.IndexType;
 import edu.uci.ics.asterix.common.feeds.FeedConnectionId;
 import edu.uci.ics.asterix.common.functions.FunctionSignature;
 import edu.uci.ics.asterix.metadata.api.IMetadataEntity;
@@ -33,6 +36,7 @@ import edu.uci.ics.asterix.metadata.entities.FeedActivity;
 import edu.uci.ics.asterix.metadata.entities.FeedPolicy;
 import edu.uci.ics.asterix.metadata.entities.Function;
 import edu.uci.ics.asterix.metadata.entities.Index;
+import edu.uci.ics.asterix.metadata.entities.InternalDatasetDetails;
 import edu.uci.ics.asterix.metadata.entities.Library;
 import edu.uci.ics.asterix.metadata.entities.NodeGroup;
 
@@ -44,6 +48,8 @@ import edu.uci.ics.asterix.metadata.entities.NodeGroup;
  */
 public class MetadataCache {
 
+    // Default life time period of a temp dataset. It is 30 days.
+    private final static long TEMP_DATASET_INACTIVE_TIME_THRESHOLD = 3600 * 24 * 30 * 1000;
     // Key is dataverse name.
     protected final Map<String, Dataverse> dataverses = new HashMap<String, Dataverse>();
     // Key is dataverse name. Key of value map is dataset name.
@@ -147,34 +153,33 @@ public class MetadataCache {
 
     public Object addDatasetIfNotExists(Dataset dataset) {
         synchronized (datasets) {
-            Map<String, Dataset> m = datasets.get(dataset.getDataverseName());
-            if (m == null) {
-                m = new HashMap<String, Dataset>();
-                datasets.put(dataset.getDataverseName(), m);
-            }
-            if (!m.containsKey(dataset.getDatasetName())) {
-                return m.put(dataset.getDatasetName(), dataset);
+            synchronized (indexes) {
+                // Add the primary index associated with the dataset, if the dataset is an
+                // internal dataset.
+                if (dataset.getDatasetType() == DatasetType.INTERNAL) {
+                    InternalDatasetDetails id = (InternalDatasetDetails) dataset.getDatasetDetails();
+                    Index index = new Index(dataset.getDataverseName(), dataset.getDatasetName(),
+                            dataset.getDatasetName(), IndexType.BTREE, id.getPartitioningKey(), id.getPrimaryKeyType(),
+                            false, true, dataset.getPendingOp());
+                    addIndexIfNotExistsInternal(index);
+                }
+
+                Map<String, Dataset> m = datasets.get(dataset.getDataverseName());
+                if (m == null) {
+                    m = new HashMap<String, Dataset>();
+                    datasets.put(dataset.getDataverseName(), m);
+                }
+                if (!m.containsKey(dataset.getDatasetName())) {
+                    return m.put(dataset.getDatasetName(), dataset);
+                }
+                return null;
             }
-            return null;
         }
     }
 
     public Object addIndexIfNotExists(Index index) {
         synchronized (indexes) {
-            Map<String, Map<String, Index>> datasetMap = indexes.get(index.getDataverseName());
-            if (datasetMap == null) {
-                datasetMap = new HashMap<String, Map<String, Index>>();
-                indexes.put(index.getDataverseName(), datasetMap);
-            }
-            Map<String, Index> indexMap = datasetMap.get(index.getDatasetName());
-            if (indexMap == null) {
-                indexMap = new HashMap<String, Index>();
-                datasetMap.put(index.getDatasetName(), indexMap);
-            }
-            if (!indexMap.containsKey(index.getIndexName())) {
-                return indexMap.put(index.getIndexName(), index);
-            }
-            return null;
+            return addIndexIfNotExistsInternal(index);
         }
     }
 
@@ -309,7 +314,6 @@ public class MetadataCache {
             if (indexMap == null) {
                 return null;
             }
-
             return indexMap.remove(index.getIndexName());
         }
     }
@@ -396,6 +400,20 @@ public class MetadataCache {
         }
     }
 
+    public List<Index> getDatasetIndexes(String dataverseName, String datasetName) {
+        List<Index> retIndexes = new ArrayList<Index>();
+        synchronized (datasets) {
+            Map<String, Index> map = indexes.get(dataverseName).get(datasetName);
+            if (map == null) {
+                return retIndexes;
+            }
+            for (Map.Entry<String, Index> entry : map.entrySet()) {
+                retIndexes.add(entry.getValue());
+            }
+            return retIndexes;
+        }
+    }
+
     /**
      * Represents a logical operation against the metadata.
      */
@@ -560,4 +578,43 @@ public class MetadataCache {
             return null;
         }
     }
+
+    private Object addIndexIfNotExistsInternal(Index index) {
+        Map<String, Map<String, Index>> datasetMap = indexes.get(index.getDataverseName());
+        if (datasetMap == null) {
+            datasetMap = new HashMap<String, Map<String, Index>>();
+            indexes.put(index.getDataverseName(), datasetMap);
+        }
+        Map<String, Index> indexMap = datasetMap.get(index.getDatasetName());
+        if (indexMap == null) {
+            indexMap = new HashMap<String, Index>();
+            datasetMap.put(index.getDatasetName(), indexMap);
+        }
+        if (!indexMap.containsKey(index.getIndexName())) {
+            return indexMap.put(index.getIndexName(), index);
+        }
+        return null;
+    }
+
+    /**
+     * Clean up temp datasets that are expired.
+     * The garbage collection will pause other dataset operations.
+     */
+    public void cleanupTempDatasets() {
+        synchronized (datasets) {
+            for (Map<String, Dataset> map : datasets.values()) {
+                Iterator<Dataset> datasetIterator = map.values().iterator();
+                while (datasetIterator.hasNext()) {
+                    Dataset dataset = datasetIterator.next();
+                    if (dataset.getDatasetDetails().isTemp()) {
+                        long currentTime = System.currentTimeMillis();
+                        long duration = currentTime - dataset.getDatasetDetails().getLastAccessTime();
+                        if (duration > TEMP_DATASET_INACTIVE_TIME_THRESHOLD) {
+                            datasetIterator.remove();
+                        }
+                    }
+                }
+            }
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataManager.java
----------------------------------------------------------------------
diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataManager.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataManager.java
index a42eee7..d7e9bbb 100644
--- a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataManager.java
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataManager.java
@@ -16,6 +16,7 @@
 package edu.uci.ics.asterix.metadata;
 
 import java.rmi.RemoteException;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
@@ -89,7 +90,7 @@ public class MetadataManager implements IMetadataManager {
     // Set in init().
     public static MetadataManager INSTANCE;
     private final MetadataCache cache = new MetadataCache();
-    private IAsterixStateProxy proxy;
+    private final IAsterixStateProxy proxy;
     private IMetadataNode metadataNode;
     private final ReadWriteLock metadataLatch;
     private final AsterixMetadataProperties metadataProperties;
@@ -141,6 +142,11 @@ public class MetadataManager implements IMetadataManager {
                         + metadataProperties.getMetadataNodeName());
             }
         }
+
+        // Starts the garbage collector thread which
+        // should always be running.
+        Thread garbageCollectorThread = new Thread(new GarbageCollector());
+        garbageCollectorThread.start();
     }
 
     @Override
@@ -236,11 +242,23 @@ public class MetadataManager implements IMetadataManager {
     @Override
     public List<Dataset> getDataverseDatasets(MetadataTransactionContext ctx, String dataverseName)
             throws MetadataException {
-        List<Dataset> dataverseDatasets;
+        List<Dataset> dataverseDatasets = new ArrayList<Dataset>();
+        // add uncommitted temporary datasets
+        for (Dataset dataset : ctx.getDataverseDatasets(dataverseName)) {
+            if (dataset.getDatasetDetails().isTemp()) {
+                dataverseDatasets.add(dataset);
+            }
+        }
+        // add the committed temporary datasets with the cache
+        for (Dataset dataset : cache.getDataverseDatasets(dataverseName)) {
+            if (dataset.getDatasetDetails().isTemp()) {
+                dataverseDatasets.add(dataset);
+            }
+        }
         try {
             // Assuming that the transaction can read its own writes on the
             // metadata node.
-            dataverseDatasets = metadataNode.getDataverseDatasets(ctx.getJobId(), dataverseName);
+            dataverseDatasets.addAll(metadataNode.getDataverseDatasets(ctx.getJobId(), dataverseName));
         } catch (RemoteException e) {
             throw new MetadataException(e);
         }
@@ -252,10 +270,12 @@ public class MetadataManager implements IMetadataManager {
     @Override
     public void addDataset(MetadataTransactionContext ctx, Dataset dataset) throws MetadataException {
         // add dataset into metadataNode
-        try {
-            metadataNode.addDataset(ctx.getJobId(), dataset);
-        } catch (RemoteException e) {
-            throw new MetadataException(e);
+        if (!dataset.getDatasetDetails().isTemp()) {
+            try {
+                metadataNode.addDataset(ctx.getJobId(), dataset);
+            } catch (RemoteException e) {
+                throw new MetadataException(e);
+            }
         }
 
         // reflect the dataset into the cache
@@ -265,11 +285,17 @@ public class MetadataManager implements IMetadataManager {
     @Override
     public void dropDataset(MetadataTransactionContext ctx, String dataverseName, String datasetName)
             throws MetadataException {
-        try {
-            metadataNode.dropDataset(ctx.getJobId(), dataverseName, datasetName);
-        } catch (RemoteException e) {
-            throw new MetadataException(e);
+        Dataset dataset = findDataset(ctx, dataverseName, datasetName);
+        // If a dataset is not in the cache, then it could not be a temp dataset
+        if (dataset == null || !dataset.getDatasetDetails().isTemp()) {
+            try {
+                metadataNode.dropDataset(ctx.getJobId(), dataverseName, datasetName);
+            } catch (RemoteException e) {
+                throw new MetadataException(e);
+            }
         }
+
+        // Drops the dataset from cache
         ctx.dropDataset(dataverseName, datasetName);
     }
 
@@ -312,13 +338,23 @@ public class MetadataManager implements IMetadataManager {
     @Override
     public List<Index> getDatasetIndexes(MetadataTransactionContext ctx, String dataverseName, String datasetName)
             throws MetadataException {
-        List<Index> datsetIndexes;
-        try {
-            datsetIndexes = metadataNode.getDatasetIndexes(ctx.getJobId(), dataverseName, datasetName);
-        } catch (RemoteException e) {
-            throw new MetadataException(e);
+        List<Index> datasetIndexes = new ArrayList<Index>();
+        Dataset dataset = findDataset(ctx, dataverseName, datasetName);
+        if (dataset == null) {
+            return datasetIndexes;
+        }
+        if (dataset.getDatasetDetails().isTemp()) {
+            // for temp datsets
+            datasetIndexes = cache.getDatasetIndexes(dataverseName, datasetName);
+        } else {
+            try {
+                // for persistent datasets
+                datasetIndexes = metadataNode.getDatasetIndexes(ctx.getJobId(), dataverseName, datasetName);
+            } catch (RemoteException e) {
+                throw new MetadataException(e);
+            }
         }
-        return datsetIndexes;
+        return datasetIndexes;
     }
 
     @Override
@@ -413,10 +449,15 @@ public class MetadataManager implements IMetadataManager {
 
     @Override
     public void addIndex(MetadataTransactionContext ctx, Index index) throws MetadataException {
-        try {
-            metadataNode.addIndex(ctx.getJobId(), index);
-        } catch (RemoteException e) {
-            throw new MetadataException(e);
+        String dataverseName = index.getDataverseName();
+        String datasetName = index.getDatasetName();
+        Dataset dataset = findDataset(ctx, dataverseName, datasetName);
+        if (dataset == null || !dataset.getDatasetDetails().isTemp()) {
+            try {
+                metadataNode.addIndex(ctx.getJobId(), index);
+            } catch (RemoteException e) {
+                throw new MetadataException(e);
+            }
         }
         ctx.addIndex(index);
     }
@@ -435,10 +476,15 @@ public class MetadataManager implements IMetadataManager {
     @Override
     public void dropIndex(MetadataTransactionContext ctx, String dataverseName, String datasetName, String indexName)
             throws MetadataException {
-        try {
-            metadataNode.dropIndex(ctx.getJobId(), dataverseName, datasetName, indexName);
-        } catch (RemoteException e) {
-            throw new MetadataException(e);
+        Dataset dataset = findDataset(ctx, dataverseName, datasetName);
+        // If a dataset is not in the cache, then it could be an unloaded persistent dataset.
+        // If the dataset is a temp dataset, then we do not need to call any MedataNode operations.
+        if (dataset == null || !dataset.getDatasetDetails().isTemp()) {
+            try {
+                metadataNode.dropIndex(ctx.getJobId(), dataverseName, datasetName, indexName);
+            } catch (RemoteException e) {
+                throw new MetadataException(e);
+            }
         }
         ctx.dropIndex(dataverseName, datasetName, indexName);
     }
@@ -691,6 +737,7 @@ public class MetadataManager implements IMetadataManager {
         return feedActivity;
     }
 
+    @Override
     public void dropLibrary(MetadataTransactionContext ctx, String dataverseName, String libraryName)
             throws MetadataException {
         try {
@@ -815,6 +862,7 @@ public class MetadataManager implements IMetadataManager {
         ctx.addFeed(feed);
     }
 
+    @Override
     public List<FeedActivity> getConnectFeedActivitiesForFeed(MetadataTransactionContext ctx, String dataverse,
             String feedName) throws MetadataException {
         List<FeedActivity> feedActivities = null;
@@ -901,4 +949,17 @@ public class MetadataManager implements IMetadataManager {
         ctx.dropDataset(dataset);
         ctx.addDataset(dataset);
     }
+
+    @Override
+    public void cleanupTempDatasets() {
+        cache.cleanupTempDatasets();
+    }
+
+    private Dataset findDataset(MetadataTransactionContext ctx, String dataverseName, String datasetName) {
+        Dataset dataset = ctx.getDataset(dataverseName, datasetName);
+        if (dataset == null) {
+            dataset = cache.getDataset(dataverseName, datasetName);
+        }
+        return dataset;
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/ccd67fe8/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataTransactionContext.java
----------------------------------------------------------------------
diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataTransactionContext.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataTransactionContext.java
index 3bdb2bf..826ebbf 100644
--- a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataTransactionContext.java
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataTransactionContext.java
@@ -122,7 +122,8 @@ public class MetadataTransactionContext extends MetadataCache {
     }
 
     public void dropIndex(String dataverseName, String datasetName, String indexName) {
-        Index index = new Index(dataverseName, datasetName, indexName, null, null, null, false, false, IMetadataEntity.PENDING_NO_OP);
+        Index index = new Index(dataverseName, datasetName, indexName, null, null, null, false, false,
+                IMetadataEntity.PENDING_NO_OP);
         droppedCache.addIndexIfNotExists(index);
         logAndApply(new MetadataLogicalOperation(index, false));
     }



Mime
View raw message