OutputCollector<IntWritable, HITSNode> output, Reporter reporter)
throws IOException {
mOutput = output;
ArrayListOfIntsWritable links = new ArrayListOfIntsWritable();
String line = ((Text) value).toString();
//System.out.println(line);
StringTokenizer itr = new StringTokenizer(line);
if (itr.hasMoreTokens()) {
int curr = Integer.parseInt(itr.nextToken());
if (!(stopList.contains(curr))) {
links.add(curr);
} else {
return;
}
// add to HMap here
}
while (itr.hasMoreTokens()) {
int curr = Integer.parseInt(itr.nextToken());
//System.out.println("-->" + curr + " " + links.toString());
if (!(stopList.contains(curr))) {
if (adjLists.containsKey(curr)) {
//FIXME?
ArrayListOfIntsWritable list = new ArrayListOfIntsWritable(adjLists.get(curr));
list.trimToSize();
links.trimToSize();
list.addUnique(links.getArray());
adjLists.remove(curr);
adjLists.put(curr, list);
} else {
links.trimToSize();
adjLists.put(curr, links);