TreeID key = new TreeID();
MapredOutput value = new MapredOutput();
int index = 0;
for (Path path : outfiles) {
Reader reader = new Reader(fs, path, conf);
try {
while (reader.next(key, value)) {
if (keys != null) {
keys[index] = key.clone();
}
if (trees != null) {
trees[index] = value.getTree();
}
processOutput(firstIds, key, value, callback);
index++;
}
} finally {
reader.close();
}
}
// make sure we got all the keys/values
if ((keys != null) && (index != keys.length)) {