Github user kiszk commented on a diff in the pull request: https://github.com/apache/spark/pull/22399#discussion_r218121426 --- Diff: sql/hive-thriftserver/src/main/java/org/apache/hive/service/cli/CLIService.java --- @@ -146,16 +146,11 @@ public UserGroupInformation getHttpUGI() { public synchronized void start() { super.start(); // Initialize and test a connection to the metastore - IMetaStoreClient metastoreClient = null; try { - metastoreClient = new HiveMetaStoreClient(hiveConf); - metastoreClient.getDatabases("default"); - } catch (Exception e) { - throw new ServiceException("Unable to connect to MetaStore!", e); - } - finally { - if (metastoreClient != null) { - metastoreClient.close(); + try (IMetaStoreClient metastoreClient = new HiveMetaStoreClient(hiveConf)) { --- End diff -- Do we need `try` at line 149?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org