0

I create extends hive table :

 CREATE EXTERNAL TABLE  hivelog (timestamp BIGINT ,value STRING)
 PARTITIONED BY(dt BIGINT) row format serde
 'hive.serde.AdsClickLogWritableDeserializer'  stored as inputformat
 'org.apache.hadoop.mapred.SequenceFileInputFormat'   outputformat
 'org.apache.hadoop.mapred.SequenceFileOutputFormat' location
 '/user/hive/HiveData';

hive.serde.AdsClickLogWritableDeserializer is my class deserialized data.

then i run query

select count(*) from hivelog  that has error:

2013-04-22 22:30:51,228 FATAL org.apache.hadoop.mapred.Child: Error running child : java.lang.OutOfMemoryError: Java heap space
    at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.<init>(MapTask.java:949)
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:428)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:372)
    at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at org.apache.hadoop.mapred.Child.main(Child.java:249)

My hive version is 0.90 and hadoop version is 1.0.0

How to fix this. Thanks so much.

cldo
  • 1,735
  • 6
  • 21
  • 26
  • try to increase JVM memory settings refer [How can I increase the JVM memory?][1] and [Behaviour of JVM during out of memory error ?][2] [1]: http://stackoverflow.com/questions/2294268/how-can-i-increase-the-jvm-memory [2]: http://stackoverflow.com/questions/7753443/behaviour-of-jvm-during-out-of-memory-error-list-s-new-arrayliststring – Laxmikanth Samudrala Apr 22 '13 at 17:50

1 Answers1

0

try to increase JVM memory settings to handle the OutOfMemoryError

refer [How can I increase the JVM memory?][1] and [Behaviour of JVM during out of memory error ?][2] [1]: How can I increase the JVM memory? [2]: Behaviour of JVM during out of memory error? List s = new ArrayList<String>();

Community
  • 1
  • 1
Laxmikanth Samudrala
  • 2,203
  • 5
  • 28
  • 45
  • thank you. I have add config mapred.child.java.opts is -Xmx1024m. And where i create table CREATE TABLE list_bucket_single (key STRING, value STRING); then run select query succcessful.And number rown of table hivelog is small. – cldo Apr 22 '13 at 17:59