Beeline Fails to Start | lang.OutOfMemoryError: Java heap space | Large History File

0 votes
1 view
asked Aug 30, 2017 in Hadoop by admin (4,410 points)
SummaryA large history file containing very long rows will consume a lot of heap, preventing Beeline from starting.
Applies To

Beeline fails to start with the following error:

Exception in thread "main" java.lang.OutOfMemoryError: Requested array size exceeds VM limit 
at java.util.Arrays.copyOf( 
at org.apache.hive.beeline.BeeLine.getConsoleReader( 
at org.apache.hive.beeline.BeeLine.begin( 
at org.apache.hive.beeline.BeeLine.mainWithInputRedirection( 
at org.apache.hive.beeline.BeeLine.main( 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke( 
at sun.reflect.DelegatingMethodAccessorImpl.invoke( 
at java.lang.reflect.Method.invoke( 
at org.apache.hadoop.util.RunJar.main( 


A large Beeline history file (default ~/.beeline/history)  consumes heap memory.
But if the file has extremely long rows in it, it may cause this issue.

Note: Beeline only loads the latest 500 rows from the history file, so, this issue does not happen very often.


Option 1:

Move the Beeline history file to another location.

Option 2:

Delete the Beeline history file.

Please log in or register to answer this question.