The LIBNAME connection to Hadoop and Hive creates a primary connection that is retained until the LIBNAME connection is cleared or the SAS® session ends. When the LIBNAME connection is used, a 'utility' connection is also created and retained until the LIBNAME connection is cleared or the SAS session ends.
When the maximum number of connection threads that are available in Hadoop or Hive has been reached, the LIBNAME connection fails with errors similar to the following:
ERROR: java.util.concurrent.TimeoutException
ERROR: Could not open connection to
jdbc:hive://hdp01.us.com:10000/schema1;
principal=hive/_HOST@HDP01.US.COM. Check your Hive server status and
also set option SUBPROTOCOL= appropriately. Set SUBPROTOCOL=hive2 if
you are running HiveServer2. Set SUBPROTOCOL=hive if you are running
Hive1.
ERROR: Error trying to establish connection.
ERROR: Error in the LIBNAME statement.
The hive.server2.thrift.max.worker.threads property controls the maximum number of connections allowed to the Hive server. The property is documented in the Hive configuration documentation. Hadoop administrators must determine the maximum number of connections that are allowed at their site. If the number of allowed connections is greater than the default or current value of the hive.server2.thrift.max.worker.threads property, the administrators need to increase value for the property.