add pagerank multi-job test
diff --git a/pregelix/pregelix-dataflow/src/main/java/edu/uci/ics/pregelix/dataflow/context/PJobContext.java b/pregelix/pregelix-dataflow/src/main/java/edu/uci/ics/pregelix/dataflow/context/PJobContext.java
index 15836e6..0ddb7d5 100644
--- a/pregelix/pregelix-dataflow/src/main/java/edu/uci/ics/pregelix/dataflow/context/PJobContext.java
+++ b/pregelix/pregelix-dataflow/src/main/java/edu/uci/ics/pregelix/dataflow/context/PJobContext.java
@@ -36,7 +36,7 @@
                 fileRef.delete();
 
         iterationToFiles.clear();
-        appStateMap.remove(jobId);
+        appStateMap.clear();
         jobIdToMove.remove(jobId);
         jobIdToSuperStep.remove(jobId);
     }
diff --git a/pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobTest.java b/pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobConnectedComponentsTest.java
similarity index 97%
rename from pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobTest.java
rename to pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobConnectedComponentsTest.java
index 3f42c0d..65b9845 100644
--- a/pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobTest.java
+++ b/pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobConnectedComponentsTest.java
@@ -34,11 +34,11 @@
 import edu.uci.ics.pregelix.example.util.TestUtils;
 
 /**
- * This test case tests multi-user workload.
+ * This test case tests multi-user workload, using ConnectedComponents.
  * 
  * @author yingyib
  */
-public class MultiJobTest {
+public class MultiJobConnectedComponentsTest {
     private static String INPUTPATH = "data/webmapcomplex";
     private static String OUTPUTPAH = "actual/result";
     private static String OUTPUTPAH2 = "actual/result2";
diff --git a/pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobTest.java b/pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobPageRankTest.java
similarity index 65%
copy from pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobTest.java
copy to pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobPageRankTest.java
index 3f42c0d..cfd1b27 100644
--- a/pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobTest.java
+++ b/pregelix/pregelix-example/src/test/java/edu/uci/ics/pregelix/example/MultiJobPageRankTest.java
@@ -24,43 +24,40 @@
 
 import edu.uci.ics.pregelix.api.job.PregelixJob;
 import edu.uci.ics.pregelix.api.util.ConservativeCheckpointHook;
-import edu.uci.ics.pregelix.api.util.DefaultVertexPartitioner;
 import edu.uci.ics.pregelix.core.driver.Driver;
 import edu.uci.ics.pregelix.core.util.PregelixHyracksIntegrationUtil;
-import edu.uci.ics.pregelix.example.ConnectedComponentsVertex.SimpleConnectedComponentsVertexOutputFormat;
+import edu.uci.ics.pregelix.example.PageRankVertex.SimplePageRankVertexOutputFormat;
 import edu.uci.ics.pregelix.example.data.VLongNormalizedKeyComputer;
-import edu.uci.ics.pregelix.example.inputformat.TextConnectedComponentsInputFormat;
+import edu.uci.ics.pregelix.example.inputformat.TextPageRankInputFormat;
 import edu.uci.ics.pregelix.example.util.TestCluster;
 import edu.uci.ics.pregelix.example.util.TestUtils;
 
 /**
- * This test case tests multi-user workload.
+ * This test case tests multi-user workload, using PageRank.
  * 
  * @author yingyib
  */
-public class MultiJobTest {
-    private static String INPUTPATH = "data/webmapcomplex";
+public class MultiJobPageRankTest {
+    private static String INPUTPATH = "data/webmap";
     private static String OUTPUTPAH = "actual/result";
     private static String OUTPUTPAH2 = "actual/result2";
-    private static String EXPECTEDPATH = "src/test/resources/expected/ConnectedComponentsRealComplex";
+    private static String EXPECTEDPATH = "src/test/resources/expected/PageRankReal";
 
     @Test
     public void test() throws Exception {
         TestCluster testCluster = new TestCluster();
         try {
-            PregelixJob job = new PregelixJob(ConnectedComponentsVertex.class.getName());
-            job.setVertexClass(ConnectedComponentsVertex.class);
-            job.setVertexClass(ConnectedComponentsVertex.class);
-            job.setVertexInputFormatClass(TextConnectedComponentsInputFormat.class);
-            job.setVertexOutputFormatClass(SimpleConnectedComponentsVertexOutputFormat.class);
-            job.setMessageCombinerClass(ConnectedComponentsVertex.SimpleMinCombiner.class);
+            PregelixJob job = new PregelixJob(PageRankVertex.class.getName());
+            job.setVertexClass(PageRankVertex.class);
+            job.setVertexInputFormatClass(TextPageRankInputFormat.class);
+            job.setVertexOutputFormatClass(SimplePageRankVertexOutputFormat.class);
+            job.setMessageCombinerClass(PageRankVertex.SimpleSumCombiner.class);
             job.setNoramlizedKeyComputerClass(VLongNormalizedKeyComputer.class);
-            job.setVertexPartitionerClass(DefaultVertexPartitioner.class);
-            job.setDynamicVertexValueSize(true);
             FileInputFormat.setInputPaths(job, INPUTPATH);
             FileOutputFormat.setOutputPath(job, new Path(OUTPUTPAH));
-            job.getConfiguration().setLong(PregelixJob.NUM_VERTICE, 23);
+            job.getConfiguration().setLong(PregelixJob.NUM_VERTICE, 20);
             job.setCheckpointHook(ConservativeCheckpointHook.class);
+            job.setFixedVertexValueSize(true);
 
             testCluster.setUp();
             Thread thread = new Thread(new Runnable() {
@@ -69,19 +66,17 @@
                 public void run() {
                     try {
                         Driver driver = new Driver(PageRankVertex.class);
-                        PregelixJob job2 = new PregelixJob(ConnectedComponentsVertex.class.getName());
-                        job2.setVertexClass(ConnectedComponentsVertex.class);
-                        job2.setVertexClass(ConnectedComponentsVertex.class);
-                        job2.setVertexInputFormatClass(TextConnectedComponentsInputFormat.class);
-                        job2.setVertexOutputFormatClass(SimpleConnectedComponentsVertexOutputFormat.class);
-                        job2.setMessageCombinerClass(ConnectedComponentsVertex.SimpleMinCombiner.class);
+                        PregelixJob job2 = new PregelixJob(PageRankVertex.class.getName());
+                        job2.setVertexClass(PageRankVertex.class);
+                        job2.setVertexInputFormatClass(TextPageRankInputFormat.class);
+                        job2.setVertexOutputFormatClass(SimplePageRankVertexOutputFormat.class);
+                        job2.setMessageCombinerClass(PageRankVertex.SimpleSumCombiner.class);
                         job2.setNoramlizedKeyComputerClass(VLongNormalizedKeyComputer.class);
-                        job2.setVertexPartitionerClass(DefaultVertexPartitioner.class);
-                        job2.setDynamicVertexValueSize(true);
                         FileInputFormat.setInputPaths(job2, INPUTPATH);
                         FileOutputFormat.setOutputPath(job2, new Path(OUTPUTPAH2));
-                        job2.getConfiguration().setLong(PregelixJob.NUM_VERTICE, 23);
+                        job2.getConfiguration().setLong(PregelixJob.NUM_VERTICE, 20);
                         job2.setCheckpointHook(ConservativeCheckpointHook.class);
+                        job2.setFixedVertexValueSize(true);
                         driver.runJob(job2, "127.0.0.1", PregelixHyracksIntegrationUtil.TEST_HYRACKS_CC_CLIENT_PORT);
                         TestUtils.compareWithResultDir(new File(EXPECTEDPATH), new File(OUTPUTPAH2));
                     } catch (Exception e) {