AnsweredAssumed Answered

Loading Hive Bucketed Table

Question asked by sgudavalliR on Oct 19, 2017
Latest reply on Oct 19, 2017 by takeshi

I am trying to populate below hive clustered ORC table.

CREATE TABLE llos(id string,x string,y string,z string,rg string,buketkey string, cat int,scat int,usr string,org string,act int,ctm int,c1 string,c2 string,c3 string,d1 int,d2 int,doc binary)
partitioned by (cdt int,catpartkey string,usrpartkey string)
CLUSTERED BY (buketkey) SORTED BY (cat,usr) INTO 25 Buckets
stored as orc
LOCATION "/apps/spark/llos"
tblproperties (
'orc.compress' = 'ZLIB',
'orc.create.index' = 'true',
'orc.bloom.filter.columns' = 'cat,usr',

and now,

INSERT INTO TABLE auditlogsv3 PARTITION (cdt, catpartkey, usrpartkey)
SELECT id,chn ,ht ,br ,rg , CASE WHEN cat > 9 then concat(cast(cat as string), "$", usr) else concat("0", cast(cat as string), "$", usr) end as bucketkey,cat ,scat ,usr ,org ,act ,ctm ,c1 ,c2 ,c3 ,d1 ,d2 ,doc, cdt, catpartkey, usrpartkey from auditlogsv2 where cdt=20171002 and catpartkey= 'others' and usrpartkey = 'ahpUsers' distribute by bucketkey SORT by bucketkey, cat, usr

I am having trouble with following Error in the last reduce task. can you please help.
and i just added a new disk in the cluster to make more space available. space seems not to be an issue
i am lost here..

here are my settings: 


set hive.exec.max.dynamic.partitions.pernode=2000; SET hive.exec.dynamic.partition.mode = nonstrict; set hive.exec.max.dynamic.partitions=2000; set hive.enforce.sorting=true;
set hive.enforce.bucketing=true;
set hive.orc.splits.include.file.footer=true;   SET mapreduce.reduce.memory.mb=8192;
set mapred.job.shuffle.input.buffer.percent=0.4;



2017-10-19 23:26:42,754 INFO [IPC Server handler 18 on 46711] org.apache.hadoop.mapred.TaskAttemptListenerImpl: Progress of TaskAttempt attempt_1508162012352_0153_r_000009_0 is : 0.0 2017-10-19 23:26:42,756 FATAL [IPC Server handler 26 on 46711] org.apache.hadoop.mapred.TaskAttemptListenerImpl: Task: attempt_1508162012352_0153_r_000009_0 - exited : org.apache.hadoop.mapreduce.task.reduce.Shuffle$ShuffleError: error in shuffle in InMemoryMerger - Thread to merge in-memory shuffled map-outputs      at      at      at org.apache.hadoop.mapred.YarnChild$      at Method)      at      at      at org.apache.hadoop.mapred.YarnChild.main( Caused by: 2065.9237.775826 /var/mapr/local/bossrnd113059/mapred/nodeManager/spill/job_1508162012352_0153/attempt_1508162012352_0153_r_000009_0/map_6.out (No space left on device)      at com.mapr.fs.Inode.throwIfFailed(      at com.mapr.fs.Inode.flushPages(      at com.mapr.fs.Inode.releaseDirty(      at com.mapr.fs.MapRFsOutStream.dropCurrentPage(      at com.mapr.fs.MapRFsOutStream.write(      at com.mapr.fs.MapRFsDataOutputStream.write(      at org.apache.hadoop.mapred.IFileOutputStream.write(      at org.apache.hadoop.fs.FSDataOutputStream$PositionCache.write(      at      at org.apache.hadoop.mapred.IFile$Writer.append(      at org.apache.hadoop.mapred.Merger.writeFile(      at org.apache.hadoop.mapreduce.task.reduce.DirectShuffleMergeManagerImpl$InMemoryMerger.merge(      at