Reply
New Contributor
Posts: 3
Registered: ‎12-01-2015

Pig Stack Trace ERROR 2997: Unable to recreate exception from backed error: Info:Error: Java heap s

I am getting following error msg when running pig script. 

ERROR 2997: Unable to recreate exception from backed error: AttemptID:attempt_1474323396845_0004_m_000000_3 Info:Error: Java heap space

org.apache.pig.backend.executionengine.ExecException: ERROR 2997: Unable to recreate exception from backed error: AttemptID:attempt_1474323396845_0004_m_000000_3 Info:Error: Java heap space
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.Launcher.getErrorMessages(Launcher.java:217)
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.Launcher.getStats(Launcher.java:151)

 

the pig script I use is 

--source code for enternal jar: https://github.com/twitter/elephant-bird/tree/master/pig/src/test/java/com/twitter/elephantbird/pig/...
REGISTER /usr/local/share/elephant-bird-hadoop-compat-4.15-RC1.jar;
REGISTER /usr/local/share/elephant-bird-pig-4.15-RC1.jar;
REGISTER /usr/local/share/json-simple-1.1.1.jar;
REGISTER /opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/jars/hive-hcatalog-core-1.1.0-cdh5.7.0.jar;
raw_file = LOAD '$file' USING com.twitter.elephantbird.pig.load.JsonLoader('-nestedLoad') As jsonMap;
parent = FOREACH raw_file GENERATE FLATTEN(jsonMap#'root') as parent_root;
parent_root_notempty = FILTER parent BY not IsEmpty($0#'root');
child_root = FOREACH parent_root_notempty GENERATE FLATTEN($0#'root') as item,
(chararray)$0#'version' as version;
final = FOREACH child_root GENERATE
(chararray)$0#'build_uuid' as build_uuid,
(chararray)$0#'hash' as hash,
(chararray)$0#'description' as description,
(chararray)$0#'file_path' as file_path,
(chararray)$0#'start_time' as start_time,
(chararray)$0#'build_step' as build_step,
(chararray)$0#'result_code' as result_code,
(int)$0#'bytes_transferred' as bytes_transferred,
LOWER((chararray)$0#'machine') as machine,
(chararray)$0#'result' as result,
(float)$0#'duration' as duration,
(chararray)$0#'operation' as operation,
(chararray)$0#'finish_time' as finish_time,
(chararray)$0#'id' as id,
version as version,
ToUnixTime(CurrentTime()) as system_timestamp,
TOMAP(' "": ""') as place_holder:map[];
STORE final INTO 'default.raw_cachebuild_hit_miss' using org.apache.hive.hcatalog.pig.HCatStorer();

thanks.