Beeline of HiveServer2 hangs if huge output data needs to return

Document created by Hao Zhu Employee on Feb 7, 2016
Version 1Show Document
  • View in full screen mode

Author: Hao Zhu

 

Original Publication Date:July 6, 2015

 

Environment :

Hive all versions

Symptom

Beeline of HiveServer2 hangs if huge output data is returned. At this point users have no choice but to kill (ctrl-C) beeline. Also, "Out of Memory" error may show up.

Root Cause

As per HIVE-7224, by default beeline tries to buffer the entire output relation before printing it on stdout.

Solution

Beeline has the option "--incremental=true" to print output incrementally. This option is not in "beeline --help" command output yet.

 

So just invoke beeline as below:

beeline --incremental=true

Attachments

    Outcomes