Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.0, 3.0.0
-
None
-
None
Description
We had a custom client that did not handle closing the operations, until the end of the session. it is a mistake in the client, but it reveals kind of a vulnerability in HiveServer2
This happens if you have a session with (1) HiveCommandOperation and (2) SQLOperation and don't close them right after. For example a session that does the operations (set a=b; select * from foobar; ).
When SQLOperation runs , it set SessionState.out and err to be System.out and System.err . Ref: SQLOperation#setupSessionIO
Then the client closes the session, or disconnects which triggers closeSession() on the Thrift side. In this case, the closeSession closes all the operations, starting with HiveCommandOperation. This closes all the streams, which is System.out and System.err as set by SQLOperation earlier. Ref: HiveCommandOperation#tearDownSessionIO
After this, no more HiveServer2 output appears as System.out and System.err are closed.
Attachments
Attachments
Issue Links
- is caused by
-
HIVE-11710 Beeline embedded mode doesn't output query progress after setting any session property
- Closed