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 by adding 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. In this task, you use Apache Ambari to limit the number of concurrent
connections per user. Alternatively, you can modify
hive-site.xml from the file system. You must configure
concurrent connections on the server side; therefore, a hive
--hiveconf
command does not work.
- The following components are running:
- Ambari
- HiveServer
- Hive Metastore
- A database for the metastore, such as the default MySQL Server
- Hive clients
- You have a user name and password for connecting to Apache Hive.