Hadoop Map Reduce reference static objects

前端 未结 3 1290
無奈伤痛
無奈伤痛 2021-01-07 03:38

I have a static object in my map reduce job class that I want to initialize once (in the main method), then call a function on it in every mapping. So I have this object, M

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-07 04:10

    Since my object was really loading a library, I ended up using the distributed cache and just instantiating the object in the M/R methods.

提交回复
热议问题