Wouldn't the configure() method of Mapper be the place to do this kind of setup? There you have access to JobConf, through which you can pass the file path, instead of entire data.
In the new API, this method is called setup() Juber On Sun, Jul 25, 2010 at 1:40 PM, Benjamin Hiller <[email protected]> wrote: > Nevermind, I passed only the path, without the actual file to the reader... > > Ben > > ----- Original Message ----- From: "Benjamin Hiller" > <[email protected]> > To: <[email protected]> > Sent: Sunday, July 25, 2010 7:31 PM > Subject: Re: Reading File in constructor of Mapper > > >> Thanks for the quick reply! >> It seems to work, although I get an >> java.io.FileNotFoundException: J:\OSMMap\Graphoutput (Zugriff verweigert) >> >> which means "Access denied", when Job2 is trying to read the file Job1 >> created. This is probably unrelated to hadoop and some problem with Windows, >> but nevertheless, any thoughts on that? (Job1 is done at that moment.) >> Anyway, thanks for your help! >> >> Ben >> >> ----- Original Message ----- From: "Owen O'Malley" <[email protected]> >> To: <[email protected]> >> Sent: Sunday, July 25, 2010 5:47 PM >> Subject: Re: Reading File in constructor of Mapper >> >> >>> Usually, you'd do that kind of processing in the setConf method of the >>> Mapper (assuming you mark it Configurable). That will let you get the >>> configuration which can contain the location of the file to read. >>> >>> -- Owen >>> >> >> > >
