Hi,
I have pasted the code below for HConnectionManager.getConnection
public static HConnection getConnection(Configuration conf)
throws ZooKeeperConnectionException {
HConnectionKey connectionKey = new HConnectionKey(conf);
synchronized (HBASE_INSTANCES) {
HConnectionImplementation connection =
HBASE_INSTANCES.get(connectionKey);
if (connection == null) {
connection = new HConnectionImplementation(conf);
HBASE_INSTANCES.put(connectionKey, connection);
}
connection.incCount();
return connection;
}
}
just curious as to why double checked locking isn't implemented here ? Is it
because there's won't be too many threads calling this method simultaneouly.
?
Cheers,
Akash A