for (int attempt = 0; !isConnected && attempt < retries; ++attempt) {
for (HostAndPort store : metastoreHosts) {
logger.info("Trying to connect to metastore at %s", store);
try {
final HiveMetastoreClientConfig metastoreConfig = new HiveMetastoreClientConfig()
.setHost(store.getHostText())
.setPort(store.getPort())
.setFramed(useFramedTransport);
final ThriftClientConfig clientConfig = new ThriftClientConfig()