Skip to content

Instantly share code, notes, and snippets.

@enachb
Created September 30, 2009 22:31
Show Gist options
  • Select an option

  • Save enachb/198521 to your computer and use it in GitHub Desktop.

Select an option

Save enachb/198521 to your computer and use it in GitHub Desktop.
// Tell the RecordArchiver about our entries, so we can archive them later.
RecordArchive ra = new RecordArchive(fs, inUrlsHDFS + "/../archive/incomingUrls");
ra.addJobPath(new Path(inUrlsHDFS));
Tap[] sourceFiles = new Tap[ra.getJobFiles().length];
int i = 0;
// Add only those files to the job, so we can accept more, while the job is running
for (FileStatus f : ra.getJobFiles()) {
LOG.info("Adding input files: " + f.getPath().getName());
sourceFiles[i++] = new Hfs(new FlatfileSequenceFile(new Fields("key", "value")), f.getPath().toString());
// sourceFiles[i++] = new Hfs(new TextLine(new Fields("value")), f.getPath().toString());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment