On Wed, Apr 30, 2008 at 5:11 AM, Enis Soztutar <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  There are many ways which you can pass objects using configuration.
> Possibly the easiest way would be to use Stringifier interface.
>
>  you can for example :
>
>  DefaultStringifier.store(conf, variable ,"mykey");
>
>  variable = DefaultStringifier.load(conf, "mykey", variableClass );

thanks... but I am using Hadoop-0.16 and Stringifier is a fix for 0.17 version -
https://issues.apache.org/jira/browse/HADOOP-3048

Any thoughts on how to do this in 0.16 version ?

thanks,
Taran

>
>  you should take into account that the variable you pass to configuration
> should be serializable by the framework. That means it must implement
> Writable of Serializable interfaces. In your particular case, you might want
> to look at ArrayWritable and MapWritable classes.
>
>  That said, you should however not pass large objects via configuration,
> since it can seriously effect job overhead. If the data you want to pass is
> large, then you should use other alternatives(such as DistributedCache,
> HDFS, etc).
>
>
>
>  Tarandeep Singh wrote:
>
> > Hi,
> >
> > How can I set a list or map to JobConf that I can access in
> > Mapper/Reducer class ?
> > The get/setObject method from Configuration has been deprecated and
> > the documentation says -
> > "A side map of Configuration to Object should be used instead."
> > I could not follow this :(
> >
> > Can someone please explain to me how to do this ?
> >
> > Thanks,
> > Taran
> >
> >
> >
>

Reply via email to