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();
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);
}
}
}
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);
}
}