String line;
int lastId = 0;
ArrayList<VertexInterval> intervals = new ArrayList<VertexInterval>(nShards);
while((line = rd.readLine()) != null) {
int vid = Integer.parseInt(line);
intervals.add(new VertexInterval(lastId, vid));
lastId = vid + 1;
}
return intervals;
}