Created
September 30, 2009 22:31
-
-
Save enachb/198521 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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