HiveServer2 was reconstructed and reimplemented to address limitations in the original HiveServer1 such as lack of concurrency, incomplete security implementations, and instability. HiveServer2 uses a multithreaded architecture where each client connection creates a new execution context including a session and operations. This allows HiveServer2 to associate a Hive execution context like the session and Driver with the thread serving each client request. The new Thrift interface in HiveServer2 also enables better support for common database features around authentication, authorization, and auditing compared to the original Thrift API in HiveServer1.