Description
Connection to Hive is not closed in case of an SQLException:
Connection con = DriverManager.getConnection(url); XLog.getLog(getClass()).debug("Connected successfully to " + url); // get delegation token for the given proxy user String tokenStr = ((HiveConnection)con).getDelegationToken(jobconf.get(USER_NAME), principal); XLog.getLog(getClass()).debug("Got token");
Close the Connection in a finally block.