Support Questions

Find answers, ask questions, and share your expertise

Hive Query Error:java.lang.OutOfMemoryError: Java heap space

avatar
Explorer

HQL: select count(station_id) from aws_new;

 

Result:Hive-query-error.png

 

1  What`s the reseaon?

 

2  How should I do?

1 ACCEPTED SOLUTION

avatar
Mentor
Your local Hive CLI JVM heap size is insufficient for even building and submitting the job.

Please try raising it as below, and retrying:

~> export HADOOP_CLIENT_OPTS="-Xmx2g"
~> hive -e "select count(station_id) from aws_new;"

View solution in original post

1 REPLY 1

avatar
Mentor
Your local Hive CLI JVM heap size is insufficient for even building and submitting the job.

Please try raising it as below, and retrying:

~> export HADOOP_CLIENT_OPTS="-Xmx2g"
~> hive -e "select count(station_id) from aws_new;"