Hi

Thanks Alex - this will allow me to share the shapefile, but I need to
"one time only per job per jvm" read it, parse it and store the
objects in the index.
Is the Mapper.configure() the best place to do this?  E.g. will it
only be called once per job?

Thanks

Tim


On Tue, Nov 25, 2008 at 8:12 PM, Alex Loddengaard <[EMAIL PROTECTED]> wrote:
> You should use the DistributedCache:
> <
> http://www.cloudera.com/blog/2008/11/14/sending-files-to-remote-task-nodes-with-hadoop-mapreduce/
>>
>
> and
>
> <
> http://hadoop.apache.org/core/docs/current/mapred_tutorial.html#DistributedCache
>>
>
> Hope this helps!
>
> Alex
>
> On Tue, Nov 25, 2008 at 11:09 AM, tim robertson
> <[EMAIL PROTECTED]>wrote:
>
>> Hi all,
>>
>> If I want to have an in memory "lookup" Hashmap that is available in
>> my Map class, where is the best place to initialise this please?
>>
>> I have a shapefile with polygons, and I wish to create the polygon
>> objects in memory on each node's JVM and have the map able to pull
>> back the objects by id from some HashMap<Integer, Geometry>.
>>
>> Is perhaps the best way to just have a static initialiser that is
>> synchronised so that it only gets run once and called during the
>> Map.configure() ?   This feels a little dirty.
>>
>> Thanks for advice on this,
>>
>> Tim
>>
>

Reply via email to