use of org.apache.phoenix.query.QueryServicesImpl in project phoenix by apache.
the class PhoenixDriver method getQueryServices.
@Override
public QueryServices getQueryServices() throws SQLException {
try {
lockInterruptibly(LockMode.READ);
checkClosed();
// Lazy initialize QueryServices so that we only attempt to create an HBase Configuration
// object upon the first attempt to connect to any cluster. Otherwise, an attempt will be
// made at driver initialization time which is too early for some systems.
QueryServices result = services;
if (result == null) {
synchronized (this) {
result = services;
if (result == null) {
services = result = new QueryServicesImpl(getDefaultProps());
}
}
}
return result;
} finally {
unlock(LockMode.READ);
}
}
Aggregations