job1.waitForCompletion(true);
LOG.info("Job Finished in " + (System.currentTimeMillis() - startTime) / 1000.0 + " seconds");
// Write out number of postings.
int collectionDocCount = (int) job1.getCounters().findCounter(Docs.Total).getValue();
env.writeCollectionDocumentCount(collectionDocCount);
Path dlFile = env.getDoclengthsData();
if (fs.exists(dlFile)) {
LOG.info("DocLength data exists: Skipping!");
return 0;