use of org.apache.hadoop.util.LineReader in project Cloud9 by lintool.
the class IT method testDemoCountDocsRepacked.
private void testDemoCountDocsRepacked() throws Exception {
Configuration conf = IntegrationUtils.getBespinConfiguration();
FileSystem fs = FileSystem.get(conf);
assertTrue(fs.exists(collectionPathRepacked));
String records = tmpPrefix + "-records.txt";
String[] args = new String[] { "hadoop jar", IntegrationUtils.getJar("target", "cloud9"), edu.umd.cloud9.collection.clue.CountClueWarcRecords.class.getCanonicalName(), "-repacked", "-path=" + collectionPathRepacked, "-docnoMapping=" + mappingFile, "-countOutput=" + records };
IntegrationUtils.exec(Joiner.on(" ").join(args));
LineReader reader = new LineReader(fs.open(new Path(records)));
Text str = new Text();
reader.readLine(str);
reader.close();
assertEquals(50220423, Integer.parseInt(str.toString()));
}
Aggregations