*** empty log message ***
authorhkhang <hkhang>
Thu, 12 Nov 2009 20:43:33 +0000 (20:43 +0000)
committerhkhang <hkhang>
Thu, 12 Nov 2009 20:43:33 +0000 (20:43 +0000)
Robust/src/Benchmarks/Recovery/Spider/QueryTask.java
Robust/src/Benchmarks/Recovery/Spider/Spider.java

index 8064a62471dd43f88e66ae544f2c4afc98dc35f1..0904d62629db13af04b00d3dbc0f2c5e97eeb254 100644 (file)
@@ -2,12 +2,13 @@ public class QueryTask extends Task {
        int maxDepth;
        Queue toprocess;
        DistributedHashMap results;
+       DistributedHashMap visitedList;
        GlobalString gTitle;
        GlobalString workingURL;
 
-  public QueryTask(Queue todoList, DistributedHashMap doneList, int maxDepth, DistributedHashMap results) {
+  public QueryTask(Queue todoList, DistributedHashMap visitedList, int maxDepth, DistributedHashMap results) {
     this.todoList = todoList;
-               this.doneList = doneList;
+               this.visitedList = visitedList;
                this.maxDepth = maxDepth;
                this.results = results;
                toprocess = global new Queue();
@@ -112,11 +113,11 @@ public class QueryTask extends Task {
                        gsb.append("/");
                        gsb.append(path);
 
-                       if (!doneList.containsKey(gsb.toGlobalString())) {
+                       if (!visitedList.containsKey(gsb.toGlobalString())) {
                                todoList.push(q);
                                        
                                GlobalString str = global new GlobalString("1");
-                               doneList.put(gsb.toGlobalString(), str);
+                               visitedList.put(gsb.toGlobalString(), str);
                        }
                }
        }
index 49b25d89cde7f252c2578816df2c2680f0eacbd0..e14e8a99200afaa24029230b15c74a37c1c74424 100644 (file)
@@ -32,13 +32,13 @@ public class Spider {
                        GlobalQuery firstquery = global new GlobalQuery(firstmachine, firstpage);
 
                        Queue todoList = global new Queue();
-                       DistributedHashMap doneList = global new DistributedHashMap(500, 500, 0.75f);
+                       DistributedHashMap visitedList = global new DistributedHashMap(500, 500, 0.75f);
                        DistributedHashMap results = global new DistributedHashMap(100, 100, 0.75f);
                        
                        todoList.push(firstquery);
 
                        for (i = 0; i < NUM_THREADS; i++) {
-                               qt[i] = global new QueryTask(todoList, doneList, maxDepth, results);
+                               qt[i] = global new QueryTask(todoList, visitedList, maxDepth, results);
                                works[i] = global new Work(qt[i], NUM_THREADS, i, currentWorkList);
                        }
                }