private void addConnection(String handleId, Connection connection) {
    synchronized (lock) {
      List<Connection> handleConnections = connectionMap.get(handleId);
      if (handleConnections == null) {
        handleConnections = new ArrayList<Connection>();
        connectionMap.put(handleId, handleConnections);
      }
      handleConnections.add(connection);
    }
  }
Calling getSplits() will open a HiveServer2 connection which should be closed by the calling application
using LlapBaseInputFormat.close() when the application is done with the splits.
llap-ext-client/src/java/org/apache/hadoop/hive/llap/LlapBaseInputFormat.java