hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sivaram RL <sivaram...@gmail.com>
Subject Re: Passing an object in mapper
Date Thu, 15 Aug 2013 03:25:35 GMT

In the Configuration object in your driver class you can set the properties
as key value pair. This configuration object will be set in the Job Object.
The same properties can be accessed in the mapper/reducer using the Context
Object -> getConfiguration() -> get(propertyName).

Hope this helps.

Sivaram R L

On Thu, Aug 15, 2013 at 8:39 AM, jamal sasha <jamalshasha@gmail.com> wrote:

> Hi,
>    I am initializing an object in driver code.
> For sake of argument let say I want to save data to some database..
> say:
> Connection con = new Connection(host, db);
> Now, in reducer I want to do something like
> con.write(key,value)
> So, how do i pass this object from driver to mapper / reducer/?
> Any clue? suggestions?
> Thanks

View raw message