HIVE-4629. HS2 should support an API to retrieve query logs
Review Request #14326 - Created Sept. 25, 2013 and updated
Adds a new API to HS2, String getLog(OperationHandle opHandle) that returns the query log for a given operation handle. The log is maintained in memory as a circular buffer. The default size is 128 KB, but can be configured by the user. Logging is initialized if hive.server2.in.mem.logging is set to true. Log object is created in executeStatement,getColumns,getTables,getSchemas,getCatalogs,getTypeInfo,getFunctions and destroyed in closeOperation, cancelOperation.
Add a new unit test to test log retrieval.