The makeQualified might or might not be necessary, not sure. But it should definitely be Resources.getResource (note the plural).
On Tue, Aug 10, 2010 at 5:55 PM, Drew Farris <[email protected]> wrote: > So, something like: > > Path inpath = new Path(Resource.getResource("/wdbc")); > > Or would the fs.makeQualified(..) still be needed in that case? > > - Drew > > On Tue, Aug 10, 2010 at 8:46 PM, Ted Dunning <[email protected]> > wrote: > > Even better is to use the guava idiom: Resources.getResource(...) > > > > On Tue, Aug 10, 2010 at 5:39 PM, Drew Farris <[email protected]> wrote: > > > >> Which is as a result of code like the following: > >> Path inpath = new Path(this.getClass().getResource("/wdbc/").getPath()); > >> FileSystem fs = FileSystem.get(inpath.toUri(), new Configuration()); > >> > >> DataSet dataset = FileInfoParser.parseFile(fs, inpath); > >> > >> I suspect that the patern should be something like: > >> FileSystem fs = FileSystem.get(new Configuration()); > >> Path inpath = fs.makeQualified(new > >> Path(this.getClass().getResource("/wdbc/").getPath())); > >> > > >
