From ee4612d029560f732e1c2d20fef28df2370065fb Mon Sep 17 00:00:00 2001 From: hkhang Date: Thu, 12 Nov 2009 20:43:33 +0000 Subject: [PATCH] *** empty log message *** --- Robust/src/Benchmarks/Recovery/Spider/QueryTask.java | 9 +++++---- Robust/src/Benchmarks/Recovery/Spider/Spider.java | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Robust/src/Benchmarks/Recovery/Spider/QueryTask.java b/Robust/src/Benchmarks/Recovery/Spider/QueryTask.java index 8064a624..0904d626 100644 --- a/Robust/src/Benchmarks/Recovery/Spider/QueryTask.java +++ b/Robust/src/Benchmarks/Recovery/Spider/QueryTask.java @@ -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); } } } diff --git a/Robust/src/Benchmarks/Recovery/Spider/Spider.java b/Robust/src/Benchmarks/Recovery/Spider/Spider.java index 49b25d89..e14e8a99 100644 --- a/Robust/src/Benchmarks/Recovery/Spider/Spider.java +++ b/Robust/src/Benchmarks/Recovery/Spider/Spider.java @@ -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); } } -- 2.34.1