Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

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

New Contributor

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

Master Guru
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

Master Guru
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;"
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.