Limit concurrent connections
To prevent a rogue application from repeatedly connecting to and monopolizing HiveServer, you can limit concurrent connections to HiveServer.
As administrator, you can limit concurrent connections using the Cloudera Manager Safety Valve to add one or more of the following properties to the hive-site.xml configuration file:
- hive.server2.limit.connections.per.user
- Maximum number of HiveServer concurrent connections per user
- hive.server2.limit.connections.per.ipaddress
- Maximum number of HiveServer concurrent connections per IP address
- hive.server2.limit.connections.per.user.ipaddress
- Maximum number of HiveServer concurrent connections per user and IP address combination
The default of each parameter is 0. You can change the value of each parameter to any
number. You must configure concurrent connections on the server side; therefore, a
hive --hiveconf
command does not work.
In this task, limit the number of connections per user to 25.
- The following components are running:
- HiveServer
- Hive Metastore
- Hive client
- Minimum Required Role: Configurator (also provided by Cluster Administrator, Full Administrator)