Merge branch 'asterix_lsm_stabilization' into salsubaiee/asterix_lsm_stabilization_issue_367.
diff --git a/asterix-algebra/pom.xml b/asterix-algebra/pom.xml
index 6e24513..350734b 100644
--- a/asterix-algebra/pom.xml
+++ b/asterix-algebra/pom.xml
@@ -3,7 +3,7 @@
 	<parent>
 		<artifactId>asterix</artifactId>
 		<groupId>edu.uci.ics.asterix</groupId>
-		<version>0.0.5-SNAPSHOT</version>
+		<version>0.0.6-SNAPSHOT</version>
 	</parent>
 	<artifactId>asterix-algebra</artifactId>
 
@@ -77,19 +77,19 @@
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-runtime</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-aql</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-metadata</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
diff --git a/asterix-app/pom.xml b/asterix-app/pom.xml
index 545adb2..12194c5 100644
--- a/asterix-app/pom.xml
+++ b/asterix-app/pom.xml
@@ -3,7 +3,7 @@
 	<parent>
 		<artifactId>asterix</artifactId>
 		<groupId>edu.uci.ics.asterix</groupId>
-		<version>0.0.5-SNAPSHOT</version>
+		<version>0.0.6-SNAPSHOT</version>
 	</parent>
 	<artifactId>asterix-app</artifactId>
 
@@ -94,7 +94,7 @@
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-algebra</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
@@ -143,35 +143,35 @@
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-aql</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<type>jar</type>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-om</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<type>jar</type>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-metadata</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<type>jar</type>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-tools</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<type>jar</type>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-common</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<type>jar</type>
 			<scope>compile</scope>
 		</dependency>
@@ -210,7 +210,7 @@
                 <dependency>
                 	<groupId>edu.uci.ics.asterix</groupId>
                 	<artifactId>asterix-test-framework</artifactId>
-                	<version>0.0.5-SNAPSHOT</version>
+                	<version>0.0.6-SNAPSHOT</version>
                 	<scope>test</scope>
                 </dependency>
 	</dependencies>
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/RESTAPIServlet.java b/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/RESTAPIServlet.java
index 29feb5e..2c15578 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/RESTAPIServlet.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/api/http/servlet/RESTAPIServlet.java
@@ -17,6 +17,7 @@
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.util.List;
+import java.util.logging.Level;
 
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServlet;
@@ -32,6 +33,7 @@
 import edu.uci.ics.asterix.aql.parser.AQLParser;
 import edu.uci.ics.asterix.aql.parser.ParseException;
 import edu.uci.ics.asterix.aql.translator.AqlTranslator;
+import edu.uci.ics.asterix.common.config.GlobalConfig;
 import edu.uci.ics.asterix.metadata.MetadataManager;
 import edu.uci.ics.asterix.result.ResultReader;
 import edu.uci.ics.asterix.result.ResultUtils;
@@ -95,6 +97,7 @@
             aqlTranslator.compileAndExecute(hcc, hds, asyncResults);
 
         } catch (ParseException pe) {
+            GlobalConfig.ASTERIX_LOGGER.log(Level.INFO, pe.getMessage(), pe);
             StringBuilder errorMessage = new StringBuilder();
             String message = pe.getMessage();
             message = message.replace("<", "&lt");
@@ -110,6 +113,7 @@
             JSONObject errorResp = ResultUtils.getErrorResponse(2, errorMessage.toString());
             out.write(errorResp.toString());
         } catch (Exception e) {
+            GlobalConfig.ASTERIX_LOGGER.log(Level.INFO, e.getMessage(), e);
             StringBuilder errorMessage = new StringBuilder();
             errorMessage.append(e.getMessage());
             JSONObject errorResp = ResultUtils.getErrorResponse(99, errorMessage.toString());
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/AqlTranslator.java b/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/AqlTranslator.java
index 3474a53..9900f71 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/AqlTranslator.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/aql/translator/AqlTranslator.java
@@ -440,6 +440,11 @@
                     break;
                 }
             }
+            
+            //#. initialize DatasetIdFactory if it is not initialized.
+            if (!DatasetIdFactory.isInitialized()) {
+                DatasetIdFactory.initialize(MetadataManager.INSTANCE.getMostRecentDatasetId());
+            }
 
             //#. add a new dataset with PendingAddOp
             dataset = new Dataset(dataverseName, datasetName, itemTypeName, datasetDetails, dd.getHints(), dsType,
diff --git a/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/NCApplicationEntryPoint.java b/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/NCApplicationEntryPoint.java
index f332155..72c0c24 100644
--- a/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/NCApplicationEntryPoint.java
+++ b/asterix-app/src/main/java/edu/uci/ics/asterix/hyracks/bootstrap/NCApplicationEntryPoint.java
@@ -18,153 +18,143 @@
 import edu.uci.ics.hyracks.api.application.INCApplicationEntryPoint;
 
 public class NCApplicationEntryPoint implements INCApplicationEntryPoint {
-	private static final Logger LOGGER = Logger
-			.getLogger(NCApplicationEntryPoint.class.getName());
+    private static final Logger LOGGER = Logger.getLogger(NCApplicationEntryPoint.class.getName());
 
-	private INCApplicationContext ncApplicationContext = null;
-	private AsterixAppRuntimeContext runtimeContext;
-	private String nodeId;
-	private boolean isMetadataNode = false;
-	private boolean stopInitiated = false;
-	private SystemState systemState = SystemState.NEW_UNIVERSE;
+    private INCApplicationContext ncApplicationContext = null;
+    private AsterixAppRuntimeContext runtimeContext;
+    private String nodeId;
+    private boolean isMetadataNode = false;
+    private boolean stopInitiated = false;
+    private SystemState systemState = SystemState.NEW_UNIVERSE;
 
-	@Override
-	public void start(INCApplicationContext ncAppCtx, String[] args)
-			throws Exception {
-		ncApplicationContext = ncAppCtx;
-		nodeId = ncApplicationContext.getNodeId();
-		if (LOGGER.isLoggable(Level.INFO)) {
-			LOGGER.info("Starting Asterix node controller: " + nodeId);
-		}
+    @Override
+    public void start(INCApplicationContext ncAppCtx, String[] args) throws Exception {
+        ncApplicationContext = ncAppCtx;
+        nodeId = ncApplicationContext.getNodeId();
+        if (LOGGER.isLoggable(Level.INFO)) {
+            LOGGER.info("Starting Asterix node controller: " + nodeId);
+        }
 
-		runtimeContext = new AsterixAppRuntimeContext(ncApplicationContext);
-		runtimeContext.initialize();
-		ncApplicationContext.setApplicationObject(runtimeContext);
-		JVMShutdownHook sHook = new JVMShutdownHook(this);
-		Runtime.getRuntime().addShutdownHook(sHook);
+        runtimeContext = new AsterixAppRuntimeContext(ncApplicationContext);
+        runtimeContext.initialize();
+        ncApplicationContext.setApplicationObject(runtimeContext);
+        JVMShutdownHook sHook = new JVMShutdownHook(this);
+        Runtime.getRuntime().addShutdownHook(sHook);
 
-		// #. recover if the system is corrupted by checking system state.
-		IRecoveryManager recoveryMgr = runtimeContext.getTransactionSubsystem()
-				.getRecoveryManager();
-		systemState = recoveryMgr.getSystemState();
-		if (systemState != SystemState.NEW_UNIVERSE) {
-			PersistentLocalResourceRepository localResourceRepository = (PersistentLocalResourceRepository) runtimeContext
-					.getLocalResourceRepository();
-			localResourceRepository.initialize(nodeId, null, false,
-					runtimeContext.getResourceIdFactory());
-		}
-		if (systemState == SystemState.CORRUPTED) {
-			recoveryMgr.startRecovery(true);
-		} else if (systemState == SystemState.NEW_UNIVERSE) {
-			recoveryMgr.checkpoint(true);
-		}
-	}
+        // #. recover if the system is corrupted by checking system state.
+        IRecoveryManager recoveryMgr = runtimeContext.getTransactionSubsystem().getRecoveryManager();
+        systemState = recoveryMgr.getSystemState();
+        if (LOGGER.isLoggable(Level.INFO)) {
+            LOGGER.info("System is in a state: " + systemState);
+        }
+        if (systemState != SystemState.NEW_UNIVERSE) {
+            PersistentLocalResourceRepository localResourceRepository = (PersistentLocalResourceRepository) runtimeContext
+                    .getLocalResourceRepository();
+            localResourceRepository.initialize(nodeId, null, false, runtimeContext.getResourceIdFactory());
+        }
+        if (systemState == SystemState.CORRUPTED) {
+            recoveryMgr.startRecovery(true);
+        } else if (systemState == SystemState.NEW_UNIVERSE) {
+            recoveryMgr.checkpoint(true);
+        }
+    }
 
-	@Override
-	public void stop() throws Exception {
-		if (!stopInitiated) {
-		    runtimeContext.setShuttingdown(true);
-			stopInitiated = true;
-			if (LOGGER.isLoggable(Level.INFO)) {
-				LOGGER.info("Stopping Asterix node controller: " + nodeId);
-			}
+    @Override
+    public void stop() throws Exception {
+        if (!stopInitiated) {
+            runtimeContext.setShuttingdown(true);
+            stopInitiated = true;
+            if (LOGGER.isLoggable(Level.INFO)) {
+                LOGGER.info("Stopping Asterix node controller: " + nodeId);
+            }
 
-			IRecoveryManager recoveryMgr = runtimeContext
-					.getTransactionSubsystem().getRecoveryManager();
-			recoveryMgr.checkpoint(true);
+            IRecoveryManager recoveryMgr = runtimeContext.getTransactionSubsystem().getRecoveryManager();
+            recoveryMgr.checkpoint(true);
 
-			if (isMetadataNode) {
-				MetadataBootstrap.stopUniverse();
-			}
-			runtimeContext.deinitialize();
-		} else {
-			if (LOGGER.isLoggable(Level.INFO)) {
-				LOGGER.info("Duplicate attempt to stop ignored: " + nodeId);
-			}
-		}
-	}
+            if (isMetadataNode) {
+                MetadataBootstrap.stopUniverse();
+            }
+            runtimeContext.deinitialize();
+        } else {
+            if (LOGGER.isLoggable(Level.INFO)) {
+                LOGGER.info("Duplicate attempt to stop ignored: " + nodeId);
+            }
+        }
+    }
 
-	@Override
-	public void notifyStartupComplete() throws Exception {
-		IAsterixStateProxy proxy = (IAsterixStateProxy) ncApplicationContext
-				.getDistributedState();
+    @Override
+    public void notifyStartupComplete() throws Exception {
+        IAsterixStateProxy proxy = (IAsterixStateProxy) ncApplicationContext.getDistributedState();
 
-		if (systemState == SystemState.NEW_UNIVERSE) {
-			PersistentLocalResourceRepository localResourceRepository = (PersistentLocalResourceRepository) runtimeContext
-					.getLocalResourceRepository();
-			System.out.println("nodeid" + nodeId);
-			System.out.println("proxy" + proxy);
-			System.out.println("stores"
-					+ proxy.getAsterixProperties().getStores());
-			System.out.println("store"
-					+ proxy.getAsterixProperties().getStores().get(nodeId)[0]);
+        if (systemState == SystemState.NEW_UNIVERSE) {
+            PersistentLocalResourceRepository localResourceRepository = (PersistentLocalResourceRepository) runtimeContext
+                    .getLocalResourceRepository();
+            if (LOGGER.isLoggable(Level.INFO)) {
+                LOGGER.info("nodeid" + nodeId);
+                LOGGER.info("proxy" + proxy);
+                LOGGER.info("stores" + proxy.getAsterixProperties().getStores());
+                LOGGER.info("store" + proxy.getAsterixProperties().getStores().get(nodeId)[0]);
+            }
 
-			localResourceRepository.initialize(nodeId, proxy
-					.getAsterixProperties().getStores().get(nodeId)[0], true,
-					null);
-		}
+            localResourceRepository.initialize(nodeId, proxy.getAsterixProperties().getStores().get(nodeId)[0], true,
+                    null);
+        }
 
-		isMetadataNode = nodeId.equals(proxy.getAsterixProperties()
-				.getMetadataNodeName());
-		if (isMetadataNode) {
-			registerRemoteMetadataNode(proxy);
+        isMetadataNode = nodeId.equals(proxy.getAsterixProperties().getMetadataNodeName());
+        if (isMetadataNode) {
+            registerRemoteMetadataNode(proxy);
 
-			if (LOGGER.isLoggable(Level.INFO)) {
-				LOGGER.info("Bootstrapping metadata");
-			}
-			MetadataManager.INSTANCE = new MetadataManager(proxy);
-			MetadataManager.INSTANCE.init();
-			MetadataBootstrap.startUniverse(proxy.getAsterixProperties(),
-					ncApplicationContext,
-					systemState == SystemState.NEW_UNIVERSE);
-			MetadataBootstrap.startDDLRecovery();
-		}
+            if (LOGGER.isLoggable(Level.INFO)) {
+                LOGGER.info("Bootstrapping metadata");
+            }
+            MetadataManager.INSTANCE = new MetadataManager(proxy);
+            MetadataManager.INSTANCE.init();
+            MetadataBootstrap.startUniverse(proxy.getAsterixProperties(), ncApplicationContext,
+                    systemState == SystemState.NEW_UNIVERSE);
+            MetadataBootstrap.startDDLRecovery();
+        }
 
-		IRecoveryManager recoveryMgr = runtimeContext.getTransactionSubsystem()
-				.getRecoveryManager();
-		recoveryMgr.checkpoint(true);
+        IRecoveryManager recoveryMgr = runtimeContext.getTransactionSubsystem().getRecoveryManager();
+        recoveryMgr.checkpoint(true);
 
-		// TODO
-		// reclaim storage for orphaned index artifacts in NCs.
-	}
+        // TODO
+        // reclaim storage for orphaned index artifacts in NCs.
+    }
 
-	public void registerRemoteMetadataNode(IAsterixStateProxy proxy)
-			throws RemoteException {
-		IMetadataNode stub = null;
-		MetadataNode.INSTANCE.initialize(runtimeContext);
-		stub = (IMetadataNode) UnicastRemoteObject.exportObject(
-				MetadataNode.INSTANCE, 0);
-		proxy.setMetadataNode(stub);
+    public void registerRemoteMetadataNode(IAsterixStateProxy proxy) throws RemoteException {
+        IMetadataNode stub = null;
+        MetadataNode.INSTANCE.initialize(runtimeContext);
+        stub = (IMetadataNode) UnicastRemoteObject.exportObject(MetadataNode.INSTANCE, 0);
+        proxy.setMetadataNode(stub);
 
-		if (LOGGER.isLoggable(Level.INFO)) {
-			LOGGER.info("Metadata node bound");
-		}
-	}
+        if (LOGGER.isLoggable(Level.INFO)) {
+            LOGGER.info("Metadata node bound");
+        }
+    }
 
-	/**
-	 * Shutdown hook that invokes {@link NCApplicationEntryPoint#stop() stop}
-	 * method.
-	 */
-	private static class JVMShutdownHook extends Thread {
+    /**
+     * Shutdown hook that invokes {@link NCApplicationEntryPoint#stop() stop} method.
+     */
+    private static class JVMShutdownHook extends Thread {
 
-		private final NCApplicationEntryPoint ncAppEntryPoint;
+        private final NCApplicationEntryPoint ncAppEntryPoint;
 
-		public JVMShutdownHook(NCApplicationEntryPoint ncAppEntryPoint) {
-			this.ncAppEntryPoint = ncAppEntryPoint;
-		}
+        public JVMShutdownHook(NCApplicationEntryPoint ncAppEntryPoint) {
+            this.ncAppEntryPoint = ncAppEntryPoint;
+        }
 
-		public void run() {
-			if (LOGGER.isLoggable(Level.INFO)) {
-				LOGGER.info("Shutdown hook in progress");
-			}
-			try {
-				ncAppEntryPoint.stop();
-			} catch (Exception e) {
-				if (LOGGER.isLoggable(Level.WARNING)) {
-					LOGGER.warning("Exception in executing shutdown hook" + e);
-				}
-			}
-		}
-	}
+        public void run() {
+            if (LOGGER.isLoggable(Level.INFO)) {
+                LOGGER.info("Shutdown hook in progress");
+            }
+            try {
+                ncAppEntryPoint.stop();
+            } catch (Exception e) {
+                if (LOGGER.isLoggable(Level.WARNING)) {
+                    LOGGER.warning("Exception in executing shutdown hook" + e);
+                }
+            }
+        }
+    }
 
 }
\ No newline at end of file
diff --git a/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/ExecutionTest.java b/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/ExecutionTest.java
index 299c43c..85bf257 100644
--- a/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/ExecutionTest.java
+++ b/asterix-app/src/test/java/edu/uci/ics/asterix/test/runtime/ExecutionTest.java
@@ -148,6 +148,8 @@
         // Execute the method.
         int statusCode = client.executeMethod(method);
 
+        LOGGER.info("DDL: " + method.getResponseBodyAsString());
+
         // Check if the method was executed successfully.
         if (statusCode != HttpStatus.SC_OK) {
             System.err.println("Method failed: " + method.getStatusLine());
@@ -173,6 +175,8 @@
         // Execute the method.
         int statusCode = client.executeMethod(method);
 
+        LOGGER.info("Update: " + method.getResponseBodyAsString());
+
         // Check if the method was executed successfully.
         if (statusCode != HttpStatus.SC_OK) {
             System.err.println("Method failed: " + method.getStatusLine());
diff --git a/asterix-aql/pom.xml b/asterix-aql/pom.xml
index bb6f4b5..038ec62 100644
--- a/asterix-aql/pom.xml
+++ b/asterix-aql/pom.xml
@@ -3,7 +3,7 @@
 	<parent>
 		<artifactId>asterix</artifactId>
 		<groupId>edu.uci.ics.asterix</groupId>
-		<version>0.0.5-SNAPSHOT</version>
+		<version>0.0.6-SNAPSHOT</version>
 	</parent>
 	<artifactId>asterix-aql</artifactId>
 	<build>
@@ -85,19 +85,19 @@
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-common</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-om</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-metadata</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
diff --git a/asterix-common/pom.xml b/asterix-common/pom.xml
index bb2b97f..0d5c506 100644
--- a/asterix-common/pom.xml
+++ b/asterix-common/pom.xml
@@ -3,7 +3,7 @@
 	<parent>
 		<artifactId>asterix</artifactId>
 		<groupId>edu.uci.ics.asterix</groupId>
-		<version>0.0.5-SNAPSHOT</version>
+		<version>0.0.6-SNAPSHOT</version>
 	</parent>
 	<artifactId>asterix-common</artifactId>
 	<build>
@@ -33,7 +33,7 @@
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-transactions</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<type>jar</type>
 			<scope>compile</scope>
 		</dependency>
diff --git a/asterix-events/pom.xml b/asterix-events/pom.xml
index 107cc0c..7b187bb 100644
--- a/asterix-events/pom.xml
+++ b/asterix-events/pom.xml
@@ -3,11 +3,11 @@
   <parent>
           <artifactId>asterix</artifactId>
           <groupId>edu.uci.ics.asterix</groupId>
-          <version>0.0.5-SNAPSHOT</version>
+          <version>0.0.6-SNAPSHOT</version>
   </parent>
   <groupId>edu.uci.ics.asterix</groupId>
   <artifactId>asterix-events</artifactId>
-  <version>0.0.5-SNAPSHOT</version>
+  <version>0.0.6-SNAPSHOT</version>
 
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
diff --git a/asterix-external-data/pom.xml b/asterix-external-data/pom.xml
index 67ca3df..2e99b7c 100644
--- a/asterix-external-data/pom.xml
+++ b/asterix-external-data/pom.xml
@@ -3,7 +3,7 @@
 	<parent>
 		<artifactId>asterix</artifactId>
 		<groupId>edu.uci.ics.asterix</groupId>
-		<version>0.0.5-SNAPSHOT</version>
+		<version>0.0.6-SNAPSHOT</version>
 	</parent>
 	<artifactId>asterix-external-data</artifactId>
 
@@ -84,14 +84,14 @@
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-om</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<type>jar</type>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-runtime</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<type>jar</type>
 			<scope>compile</scope>
 		</dependency>
diff --git a/asterix-installer/pom.xml b/asterix-installer/pom.xml
index 87a73af..60ae2ce 100644
--- a/asterix-installer/pom.xml
+++ b/asterix-installer/pom.xml
@@ -3,7 +3,7 @@
   <parent>
           <artifactId>asterix</artifactId>
           <groupId>edu.uci.ics.asterix</groupId>
-          <version>0.0.5-SNAPSHOT</version>
+          <version>0.0.6-SNAPSHOT</version>
   </parent>
   <artifactId>asterix-installer</artifactId>
 
@@ -136,14 +136,14 @@
     <dependency>
         <groupId>edu.uci.ics.asterix</groupId>
         <artifactId>asterix-events</artifactId>
-        <version>0.0.5-SNAPSHOT</version>
+        <version>0.0.6-SNAPSHOT</version>
         <type>jar</type>
         <scope>compile</scope>
     </dependency>
     <dependency>
         <groupId>edu.uci.ics.asterix</groupId>
         <artifactId>asterix-server</artifactId>
-        <version>0.0.5-SNAPSHOT</version>
+        <version>0.0.6-SNAPSHOT</version>
         <type>zip</type>
         <classifier>binary-assembly</classifier>
     </dependency>
diff --git a/asterix-maven-plugins/lexer-generator-maven-plugin/pom.xml b/asterix-maven-plugins/lexer-generator-maven-plugin/pom.xml
index 624c8d3..6b444e8 100644
--- a/asterix-maven-plugins/lexer-generator-maven-plugin/pom.xml
+++ b/asterix-maven-plugins/lexer-generator-maven-plugin/pom.xml
@@ -5,7 +5,7 @@
 	<parent>
 		<artifactId>asterix-maven-plugins</artifactId>
 		<groupId>edu.uci.ics.asterix</groupId>
-		<version>0.0.5-SNAPSHOT</version>
+		<version>0.0.6-SNAPSHOT</version>
 	</parent>
 
   <packaging>maven-plugin</packaging>
diff --git a/asterix-maven-plugins/pom.xml b/asterix-maven-plugins/pom.xml
index f460970..d71f2e9 100644
--- a/asterix-maven-plugins/pom.xml
+++ b/asterix-maven-plugins/pom.xml
@@ -6,7 +6,7 @@
 	<parent>
 		<artifactId>asterix</artifactId>
 		<groupId>edu.uci.ics.asterix</groupId>
-		<version>0.0.5-SNAPSHOT</version>
+		<version>0.0.6-SNAPSHOT</version>
 	</parent>
 
   <dependencies>
diff --git a/asterix-metadata/pom.xml b/asterix-metadata/pom.xml
index ca3f342..425e8ff 100644
--- a/asterix-metadata/pom.xml
+++ b/asterix-metadata/pom.xml
@@ -3,7 +3,7 @@
 	<parent>
 		<artifactId>asterix</artifactId>
 		<groupId>edu.uci.ics.asterix</groupId>
-		<version>0.0.5-SNAPSHOT</version>
+		<version>0.0.6-SNAPSHOT</version>
 	</parent>
 	<artifactId>asterix-metadata</artifactId>
 
@@ -26,19 +26,19 @@
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-common</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-om</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-external-data</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
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 ad106fe..994262d 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
@@ -544,6 +544,15 @@
             throw new MetadataException(e);
         }
     }
+    
+    @Override
+    public int getMostRecentDatasetId() throws MetadataException {
+        try { 
+            return metadataNode.getMostRecentDatasetId();
+        } catch (RemoteException e) {
+            throw new MetadataException(e);
+        }
+    }
 
     @Override
     public List<Function> getDataverseFunctions(MetadataTransactionContext ctx, String dataverseName)
@@ -601,5 +610,4 @@
     public void releaseReadLatch() {
         metadataLatch.readLock().unlock();
     }
-
 }
\ No newline at end of file
diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataNode.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataNode.java
index d9c6ed4..5bdf086 100644
--- a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataNode.java
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataNode.java
@@ -1121,4 +1121,9 @@
             throw new MetadataException(e);
         }
     }
+
+    @Override
+    public int getMostRecentDatasetId() throws MetadataException, RemoteException {
+        return DatasetIdFactory.getMostRecentDatasetId();
+    }
 }
diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/api/IMetadataManager.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/api/IMetadataManager.java
index fdf2d60..f11144e 100644
--- a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/api/IMetadataManager.java
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/api/IMetadataManager.java
@@ -441,9 +441,10 @@
     public List<Function> getDataverseFunctions(MetadataTransactionContext ctx, String dataverseName)
             throws MetadataException;
 
-	
     public void initializeDatasetIdFactory(MetadataTransactionContext ctx) throws MetadataException;
     
+    public int getMostRecentDatasetId() throws MetadataException;
+    
     public void acquireWriteLatch();
 
     public void releaseWriteLatch();
diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/api/IMetadataNode.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/api/IMetadataNode.java
index 836d42f..e0b5e96 100644
--- a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/api/IMetadataNode.java
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/api/IMetadataNode.java
@@ -473,5 +473,7 @@
     public void addAdapter(JobId jobId, DatasourceAdapter adapter) throws MetadataException, RemoteException;
 
     public void initializeDatasetIdFactory(JobId jobId) throws MetadataException, RemoteException;
+    
+    public int getMostRecentDatasetId() throws MetadataException, RemoteException;
 
 }
diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/bootstrap/MetadataBootstrap.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/bootstrap/MetadataBootstrap.java
index 805a550..73aa6dc 100644
--- a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/bootstrap/MetadataBootstrap.java
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/bootstrap/MetadataBootstrap.java
@@ -23,6 +23,7 @@
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import edu.uci.ics.asterix.common.config.DatasetConfig.DatasetType;
@@ -125,8 +126,8 @@
                 MetadataSecondaryIndexes.DATATYPENAME_ON_DATATYPE_INDEX };
     }
 
-    public static void startUniverse(AsterixProperties asterixProperties, INCApplicationContext ncApplicationContext, boolean isNewUniverse)
-            throws Exception {
+    public static void startUniverse(AsterixProperties asterixProperties, INCApplicationContext ncApplicationContext,
+            boolean isNewUniverse) throws Exception {
         runtimeContext = (AsterixAppRuntimeContext) ncApplicationContext.getApplicationObject();
 
         // Initialize static metadata objects, such as record types and metadata
@@ -163,13 +164,13 @@
         fileMapProvider = runtimeContext.getFileMapManager();
         ioManager = ncApplicationContext.getRootContext().getIOManager();
 
-        if (isNewUniverse) {
-            MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
-            try {
-                // Begin a transaction against the metadata.
-                // Lock the metadata in X mode.
-                MetadataManager.INSTANCE.lock(mdTxnCtx, LockMode.X);
-
+        MetadataTransactionContext mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
+        try {
+            // Begin a transaction against the metadata.
+            // Lock the metadata in X mode.
+            MetadataManager.INSTANCE.lock(mdTxnCtx, LockMode.X);
+            
+            if (isNewUniverse) {
                 for (int i = 0; i < primaryIndexes.length; i++) {
                     enlistMetadataDataset(primaryIndexes[i], true);
                 }
@@ -184,23 +185,35 @@
                 insertInitialGroups(mdTxnCtx);
                 insertInitialAdapters(mdTxnCtx);
 
-                MetadataManager.INSTANCE.initializeDatasetIdFactory(mdTxnCtx);
-                MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
-            } catch (Exception e) {
-                MetadataManager.INSTANCE.abortTransaction(mdTxnCtx);
-                throw e;
-            }
-            LOGGER.info("FINISHED CREATING METADATA B-TREES.");
-        } else {
-            for (int i = 0; i < primaryIndexes.length; i++) {
-                enlistMetadataDataset(primaryIndexes[i], false);
-            }
-            for (int i = 0; i < secondaryIndexes.length; i++) {
-                enlistMetadataDataset(secondaryIndexes[i], false);
-            }
-            LOGGER.info("FINISHED ENLISTMENT OF METADATA B-TREES.");
-        }
+                if (LOGGER.isLoggable(Level.INFO)) {
+                    LOGGER.info("Finished creating metadata B-trees.");
+                }
+            } else {
+                for (int i = 0; i < primaryIndexes.length; i++) {
+                    enlistMetadataDataset(primaryIndexes[i], false);
+                }
+                for (int i = 0; i < secondaryIndexes.length; i++) {
+                    enlistMetadataDataset(secondaryIndexes[i], false);
+                }
 
+                if (LOGGER.isLoggable(Level.INFO)) {
+                    LOGGER.info("Finished enlistment of metadata B-trees.");
+                }
+            }
+            
+            //#. initialize datasetIdFactory
+            MetadataManager.INSTANCE.initializeDatasetIdFactory(mdTxnCtx);
+            MetadataManager.INSTANCE.commitTransaction(mdTxnCtx);
+        } catch (Exception e) {
+            try {
+                MetadataManager.INSTANCE.abortTransaction(mdTxnCtx);
+            } catch (Exception e2) {
+                e.addSuppressed(e2);
+                //TODO
+                //change the exception type to AbortFailureException
+                throw new MetadataException(e);
+            }
+        }
     }
 
     public static void stopUniverse() throws HyracksDataException {
@@ -233,7 +246,8 @@
                     primaryIndexes[i].getNodeGroupName());
             MetadataManager.INSTANCE.addDataset(mdTxnCtx, new Dataset(primaryIndexes[i].getDataverseName(),
                     primaryIndexes[i].getIndexedDatasetName(), primaryIndexes[i].getPayloadRecordType().getTypeName(),
-                    id, new HashMap<String,String>(), DatasetType.INTERNAL, primaryIndexes[i].getDatasetId().getId(), IMetadataEntity.PENDING_NO_OP));
+                    id, new HashMap<String, String>(), DatasetType.INTERNAL, primaryIndexes[i].getDatasetId().getId(),
+                    IMetadataEntity.PENDING_NO_OP));
         }
     }
 
@@ -331,8 +345,8 @@
         LSMBTree lsmBtree = null;
         long resourceID = -1;
         if (create) {
-            lsmBtree = LSMBTreeUtils.createLSMTree(memBufferCache, memFreePageManager, ioManager, file,
-                    bufferCache, fileMapProvider, typeTraits, comparatorFactories, bloomFilterKeyFields,
+            lsmBtree = LSMBTreeUtils.createLSMTree(memBufferCache, memFreePageManager, ioManager, file, bufferCache,
+                    fileMapProvider, typeTraits, comparatorFactories, bloomFilterKeyFields,
                     runtimeContext.getLSMMergePolicy(), runtimeContext.getLSMBTreeOperationTrackerFactory(),
                     runtimeContext.getLSMIOScheduler(), AsterixRuntimeComponentsProvider.LSMBTREE_PROVIDER);
             lsmBtree.create();
@@ -358,13 +372,11 @@
                 indexLifecycleManager.register(resourceID, lsmBtree);
             }
         }
-        
+
         index.setResourceID(resourceID);
         index.setFile(file);
         indexLifecycleManager.open(resourceID);
     }
-    
-    
 
     public static String getOutputDir() {
         return outputDir;
@@ -381,9 +393,12 @@
         String datasetName = null;
         String indexName = null;
         MetadataTransactionContext mdTxnCtx = null;
-        
+
         MetadataManager.INSTANCE.acquireWriteLatch();
-        
+        if (LOGGER.isLoggable(Level.INFO)) {
+            LOGGER.info("Starting DDL recovery ...");
+        }
+
         try {
             mdTxnCtx = MetadataManager.INSTANCE.beginTransaction();
 
@@ -393,6 +408,9 @@
                 if (dataverse.getPendingOp() != IMetadataEntity.PENDING_NO_OP) {
                     //drop pending dataverse
                     MetadataManager.INSTANCE.dropDataverse(mdTxnCtx, dataverseName);
+                    if (LOGGER.isLoggable(Level.INFO)) {
+                        LOGGER.info("Dropped a pending dataverse: " + dataverseName);
+                    }
                 } else {
                     List<Dataset> datasets = MetadataManager.INSTANCE.getDataverseDatasets(mdTxnCtx, dataverseName);
                     for (Dataset dataset : datasets) {
@@ -400,6 +418,9 @@
                         if (dataset.getPendingOp() != IMetadataEntity.PENDING_NO_OP) {
                             //drop pending dataset
                             MetadataManager.INSTANCE.dropDataset(mdTxnCtx, dataverseName, datasetName);
+                            if (LOGGER.isLoggable(Level.INFO)) {
+                                LOGGER.info("Dropped a pending dataset: " + dataverseName + "." + datasetName);
+                            }
                         } else {
                             List<Index> indexes = MetadataManager.INSTANCE.getDatasetIndexes(mdTxnCtx, dataverseName,
                                     datasetName);
@@ -408,14 +429,25 @@
                                 if (index.getPendingOp() != IMetadataEntity.PENDING_NO_OP) {
                                     //drop pending index
                                     MetadataManager.INSTANCE.dropIndex(mdTxnCtx, dataverseName, datasetName, indexName);
+                                    if (LOGGER.isLoggable(Level.INFO)) {
+                                        LOGGER.info("Dropped a pending index: " + dataverseName + "." + datasetName
+                                                + "." + indexName);
+                                    }
                                 }
                             }
                         }
                     }
                 }
             }
+            if (LOGGER.isLoggable(Level.INFO)) {
+                LOGGER.info("Completed DDL recovery.");
+            }
         } catch (Exception e) {
-            MetadataManager.INSTANCE.abortTransaction(mdTxnCtx);
+            try {
+                MetadataManager.INSTANCE.abortTransaction(mdTxnCtx);
+            } catch (Exception e2) {
+                e.addSuppressed(e2);
+            }
             throw new MetadataException(e);
         } finally {
             MetadataManager.INSTANCE.releaseWriteLatch();
diff --git a/asterix-om/pom.xml b/asterix-om/pom.xml
index 276d848..f7ef8d3 100644
--- a/asterix-om/pom.xml
+++ b/asterix-om/pom.xml
@@ -3,7 +3,7 @@
 	<parent>
 		<artifactId>asterix</artifactId>
 		<groupId>edu.uci.ics.asterix</groupId>
-		<version>0.0.5-SNAPSHOT</version>
+		<version>0.0.6-SNAPSHOT</version>
 	</parent>
 	<artifactId>asterix-om</artifactId>
 
@@ -26,7 +26,7 @@
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-common</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
diff --git a/asterix-runtime/pom.xml b/asterix-runtime/pom.xml
index 3e03a32..74a1f27 100644
--- a/asterix-runtime/pom.xml
+++ b/asterix-runtime/pom.xml
@@ -3,7 +3,7 @@
 	<parent>
 		<artifactId>asterix</artifactId>
 		<groupId>edu.uci.ics.asterix</groupId>
-		<version>0.0.5-SNAPSHOT</version>
+		<version>0.0.6-SNAPSHOT</version>
 	</parent>
 	<artifactId>asterix-runtime</artifactId>
 
@@ -23,7 +23,7 @@
 	      	<plugin>
 	        	<groupId>edu.uci.ics.asterix</groupId>
 	        	<artifactId>lexer-generator-maven-plugin</artifactId>
-	        	<version>0.0.5-SNAPSHOT</version>
+	        	<version>0.0.6-SNAPSHOT</version>
 	        	<configuration>
 	        	  	<grammarFile>src/main/resources/adm.grammar</grammarFile>
 	        	  	<outputDir>${project.build.directory}/generated-sources/edu/uci/ics/asterix/runtime/operators/file/adm</outputDir>
@@ -119,7 +119,7 @@
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-om</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
@@ -135,7 +135,7 @@
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-transactions</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
diff --git a/asterix-server/pom.xml b/asterix-server/pom.xml
index 3c52104..d1d6acb 100644
--- a/asterix-server/pom.xml
+++ b/asterix-server/pom.xml
@@ -5,7 +5,7 @@
   <parent>
     <groupId>edu.uci.ics.asterix</groupId>
     <artifactId>asterix</artifactId>
-    <version>0.0.5-SNAPSHOT</version>
+    <version>0.0.6-SNAPSHOT</version>
   </parent>
 
   <build>
@@ -80,7 +80,7 @@
   	<dependency>
   		<groupId>edu.uci.ics.asterix</groupId>
   		<artifactId>asterix-app</artifactId>
-  		<version>0.0.5-SNAPSHOT</version>
+  		<version>0.0.6-SNAPSHOT</version>
   	</dependency>
   </dependencies>
 </project>
\ No newline at end of file
diff --git a/asterix-test-framework/pom.xml b/asterix-test-framework/pom.xml
index a9c3292..791bf26 100755
--- a/asterix-test-framework/pom.xml
+++ b/asterix-test-framework/pom.xml
@@ -3,7 +3,7 @@
 	<parent>
 		<artifactId>asterix</artifactId>
 		<groupId>edu.uci.ics.asterix</groupId>
-		<version>0.0.5-SNAPSHOT</version>
+		<version>0.0.6-SNAPSHOT</version>
 	</parent>
 	<artifactId>asterix-test-framework</artifactId>
 	<build>
diff --git a/asterix-tools/pom.xml b/asterix-tools/pom.xml
index bc2a7ca..248cdb5 100644
--- a/asterix-tools/pom.xml
+++ b/asterix-tools/pom.xml
@@ -3,7 +3,7 @@
 	<parent>
 		<artifactId>asterix</artifactId>
 		<groupId>edu.uci.ics.asterix</groupId>
-		<version>0.0.5-SNAPSHOT</version>
+		<version>0.0.6-SNAPSHOT</version>
 	</parent>
 	<artifactId>asterix-tools</artifactId>
 
@@ -124,13 +124,13 @@
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-aql</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-algebra</artifactId>
-			<version>0.0.5-SNAPSHOT</version>
+			<version>0.0.6-SNAPSHOT</version>
 			<scope>compile</scope>
 		</dependency>
 		<dependency>
diff --git a/asterix-transactions/pom.xml b/asterix-transactions/pom.xml
index 9777d1f..7d951ce 100644
--- a/asterix-transactions/pom.xml
+++ b/asterix-transactions/pom.xml
@@ -3,7 +3,7 @@
 	<parent>
 		<artifactId>asterix</artifactId>
 		<groupId>edu.uci.ics.asterix</groupId>
-		<version>0.0.5-SNAPSHOT</version>
+		<version>0.0.6-SNAPSHOT</version>
 	</parent>
 	<artifactId>asterix-transactions</artifactId>
 
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/resource/PersistentLocalResourceRepository.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
index 0a12ba1..01dce6c 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
@@ -25,7 +25,10 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
+import edu.uci.ics.asterix.transaction.management.service.logging.LogManager;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 import edu.uci.ics.hyracks.storage.common.file.ILocalResourceRepository;
 import edu.uci.ics.hyracks.storage.common.file.LocalResource;
@@ -33,6 +36,7 @@
 
 public class PersistentLocalResourceRepository implements ILocalResourceRepository {
 
+    private static final Logger LOGGER = Logger.getLogger(PersistentLocalResourceRepository.class.getName());
     private final String mountPoint;
     private static final String ROOT_METADATA_DIRECTORY = "asterix_root_metadata/";
     private static final String ROOT_METADATA_FILE_NAME_PREFIX = ".asterix_root_metadata_";
@@ -57,6 +61,9 @@
 
     public void initialize(String nodeId, String rootDir, boolean isNewUniverse, ResourceIdFactory resourceIdFactory)
             throws HyracksDataException {
+        if (LOGGER.isLoggable(Level.INFO)) {
+            LOGGER.info("Initializing local resource repository ... ");
+        }
         LocalResource rootLocalResource = null;
 
         //#. if the rootMetadataFile doesn't exist, create it and return.
@@ -67,6 +74,9 @@
             File rootMetadataDir = new File(mountPoint + ROOT_METADATA_DIRECTORY);
             if (!rootMetadataDir.exists()) {
                 rootMetadataDir.mkdir();
+                if (LOGGER.isLoggable(Level.INFO)) {
+                    LOGGER.info("created the root-metadata-file's directory: " + rootMetadataDir.getAbsolutePath());
+                }
             }
 
             rootMetadataFile.delete();
@@ -77,17 +87,31 @@
             }
             rootLocalResource = new LocalResource(ROOT_LOCAL_RESOURCE_ID, rootMetadataFileName, 0, 0, this.rootDir);
             insert(rootLocalResource);
+            if (LOGGER.isLoggable(Level.INFO)) {
+                LOGGER.info("created the root-metadata-file: " + rootMetadataFileName);
+            }
+            
+            if (LOGGER.isLoggable(Level.INFO)) {
+                LOGGER.info("Completed the initialization of the local resource repository");
+            }
             return;
         }
 
         //#. if the rootMetadataFile exists, read it and set this.rootDir.
         rootLocalResource = readLocalResource(rootMetadataFile);
         this.rootDir = (String) rootLocalResource.getResourceObject();
+        if (LOGGER.isLoggable(Level.INFO)) {
+            LOGGER.info("The root directory of the local resource repository is " + this.rootDir);
+        }
 
         //#. load all local resources. 
         File rootDirFile = new File(this.rootDir);
         if (!rootDirFile.exists()) {
             //rootDir may not exist if this node is not the metadata node and doesn't have any user data.
+            if (LOGGER.isLoggable(Level.INFO)) {
+                LOGGER.info("The root directory of the local resource repository doesn't exist: there is no local resource.");
+                LOGGER.info("Completed the initialization of the local resource repository");
+            }
             return;
         }
 
@@ -119,6 +143,10 @@
                                     id2ResourceMap.put(localResource.getResourceId(), localResource);
                                     name2ResourceMap.put(localResource.getResourceName(), localResource);
                                     maxResourceId = Math.max(localResource.getResourceId(), maxResourceId);
+                                    if (LOGGER.isLoggable(Level.INFO)) {
+                                        LOGGER.info("loaded local resource - [id: " + localResource.getResourceId()
+                                                + ", name: " + localResource.getResourceName() + "]");
+                                    }
                                 }
                             }
                         }
@@ -127,6 +155,10 @@
             }
         }
         resourceIdFactory.initId(maxResourceId + 1);
+        if (LOGGER.isLoggable(Level.INFO)) {
+            LOGGER.info("The resource id factory is intialized with the value: " + (maxResourceId + 1));
+            LOGGER.info("Completed the initialization of the local resource repository");
+        }
     }
 
     @Override
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/LogUtil.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/LogUtil.java
index feaca86..77a99bc 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/LogUtil.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/LogUtil.java
@@ -47,6 +47,9 @@
                 List<String> logFiles = getLogFiles(logManagerProperties);
                 if (logFiles == null || logFiles.size() == 0) {
                     FileUtil.createFileIfNotExists(getLogFilePath(logManagerProperties, 0));
+                    if (LOGGER.isLoggable(Level.INFO)) {
+                        LOGGER.info("created a log file: " + getLogFilePath(logManagerProperties, 0));
+                    }
                 } else {
                     File logFile = new File(LogUtil.getLogFilePath(logManagerProperties,
                             Long.parseLong(logFiles.get(logFiles.size() - 1))));
@@ -55,7 +58,13 @@
                 }
             } else {
                 FileUtil.createNewDirectory(logManagerProperties.getLogDir());
+                if (LOGGER.isLoggable(Level.INFO)) {
+                    LOGGER.info("created the log directory: " + logManagerProperties.getLogDir());
+                }
                 FileUtil.createFileIfNotExists(getLogFilePath(logManagerProperties, 0));
+                if (LOGGER.isLoggable(Level.INFO)) {
+                    LOGGER.info("created a log file: " + getLogFilePath(logManagerProperties, 0));
+                }
             }
         } catch (IOException ioe) {
             throw new ACIDException("Unable to initialize log anchor", ioe);
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/recovery/RecoveryManager.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/recovery/RecoveryManager.java
index c27ae20..47c5dcb 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/recovery/RecoveryManager.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/recovery/RecoveryManager.java
@@ -116,6 +116,9 @@
             //This is initial bootstrap. 
             //Otherwise, the checkpoint file is deleted unfortunately. What we can do in this case?
             state = SystemState.NEW_UNIVERSE;
+            if (LOGGER.isLoggable(Level.INFO)) {
+                LOGGER.info("The checkpoint file doesn't exist: systemState = NEW_UNIVERSE");
+            }
             return state;
         }
 
@@ -392,7 +395,7 @@
         }
 
         if (LOGGER.isLoggable(Level.INFO)) {
-            LOGGER.info("[RecoveryMgr] recovery is over");
+            LOGGER.info("[RecoveryMgr] recovery is completed.");
         }
         if (IS_DEBUG_MODE) {
             System.out.println("[RecoveryMgr] Count: Update/Commit/Redo = " + updateLogCount + "/" + commitLogCount
@@ -422,6 +425,10 @@
     @Override
     public synchronized void checkpoint(boolean isSharpCheckpoint) throws ACIDException {
 
+        if (isSharpCheckpoint && LOGGER.isLoggable(Level.INFO)) {
+            LOGGER.info("Starting sharp checkpoint ... ");
+        }
+        
         LogManager logMgr = (LogManager) txnSubsystem.getLogManager();
         TransactionManager txnMgr = (TransactionManager) txnSubsystem.getTransactionManager();
         String logDir = logMgr.getLogManagerProperties().getLogDir();
@@ -513,6 +520,10 @@
         if (isSharpCheckpoint) {
             logMgr.renewLogFiles();
         }
+        
+        if (isSharpCheckpoint && LOGGER.isLoggable(Level.INFO)) {
+            LOGGER.info("Completed sharp checkpoint.");
+        }
     }
 
     private CheckpointObject readCheckpoint() throws ACIDException, FileNotFoundException {
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/transaction/DatasetIdFactory.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/transaction/DatasetIdFactory.java
index 65512ec..17eaf38 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/transaction/DatasetIdFactory.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/transaction/DatasetIdFactory.java
@@ -4,12 +4,22 @@
 
 public class DatasetIdFactory {
     private static AtomicInteger id = new AtomicInteger();
+    private static boolean isInitialized = false; 
+    
+    public static boolean isInitialized() {
+        return isInitialized;
+    }
     
     public static void initialize(int initialId) {
     	id.set(initialId);
+    	isInitialized = true;
     }
 
     public static int generateDatasetId() {
         return id.incrementAndGet();
     }
+    
+    public static int getMostRecentDatasetId() {
+        return id.get();
+    }
 }
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 1d22918..20efdb3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>edu.uci.ics.asterix</groupId>
 	<artifactId>asterix</artifactId>
-	<version>0.0.5-SNAPSHOT</version>
+	<version>0.0.6-SNAPSHOT</version>
 	<packaging>pom</packaging>
 
     <properties>
@@ -25,8 +25,8 @@
 	</build>
 
 	<scm>
-		<connection>scm:svn:https://asterixdb.googlecode.com/svn/trunk/asterix</connection>
-		<developerConnection>scm:svn:https://asterixdb.googlecode.com/svn/trunk/asterix</developerConnection>
+		<connection>scm:git:https://code.google.com/p/asterixdb/</connection>
+		<developerConnection>scm:git:https://code.google.com/p/asterixdb/</developerConnection>
 	</scm>
 
 	<distributionManagement>