We use Hbase extensively and the general pattern we follow is acquiring a
Connection in the open() method of a RichFunction and closing in the
close() method. Of course that implies that if we have a parallelism of n,
there will be n Hbase Connections. We want to use the fact that Hbase
connection is inherently thread safe
http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Connection.html
and it is a pretty heavy object to begin with and thus makes sense to share
a Connection across slots in a single TM. We could do it through a a static
singleton pattern but was wondering if and whether there is an established
paradigm for sharing a resource ....