azure - How Many Hive Dynamic Partitions are Needed? -


i running large job consolidates 55 streams (tags) of samples (one sample per record) @ irregular times on 2 years 15-minute averages. there 1.1 billion records in 23k streams in raw dataset, , these 55 streams make 33 million of records. calculated 15-minute index , grouping average value, seem have exceeded max dynamic partitions on hive job in spite of cranking way 20k. can increase further suppose, takes awhile fail (about 6 hours, although reduced 2 reducing number of streams consider), , don’t know how calculate how many need.

here code:

set hive.exec.dynamic.partition = true;  set hive.exec.dynamic.partition.mode = nonstrict;  set hive.exec.max.dynamic.partitions=50000; set hive.exec.max.dynamic.partitions.pernode=20000;    drop table if exists sensor_part_qhr;    create table sensor_part_qhr (     tag  string,     tag0 string,     tag1 string,     tagn_1  string,     tagn  string,      timestamp  string,     unixtime int,     qqfr2013 int,      quality  int,     count  int,     stdev  double,     value    double )   partitioned (bld string);  insert table sensor_part_qhr partition (bld)  select  tag,         min(tag),          min(tag0),          min(tag1),          min(tagn_1),          min(tagn),          min(timestamp),         min(unixtime),           qqfr2013,          min(quality),     count(value),     stddev_samp(value),          avg(value)    sensor_part_subset        tag1='energy' group tag,qqfr2013; 

and here error message:

    error during job, obtaining debugging information...     examining task id: task_1442824943639_0044_m_000008 (and more) job job_1442824943639_0044     examining task id: task_1442824943639_0044_r_000000 (and more) job job_1442824943639_0044      task failures(4):      -----     task id:       task_1442824943639_0044_r_000000      url:       http://headnodehost:9014/taskdetails.jsp?jobid=job_1442824943639_0044&tipid=task_1442824943639_0044_r_000000     -----     diagnostic messages task:     error: java.lang.runtimeexception: org.apache.hadoop.hive.ql.metadata.hivefatalexception: [error 20004]: fatal error occurred when node tried create many dynamic partitions. maximum number of dynamic partitions controlled hive.exec.max.dynamic.partitions , hive.exec.max.dynamic.partitions.pernode. maximum set to: 20000         @ org.apache.hadoop.hive.ql.exec.mr.execreducer.reduce(execreducer.java:283)         @ org.apache.hadoop.mapred.reducetask.runoldreducer(reducetask.java:444)         @ org.apache.hadoop.mapred.reducetask.run(reducetask.java:392)         @ org.apache.hadoop.mapred.yarnchild$2.run(yarnchild.java:168)         @ java.security.accesscontroller.doprivileged(native method)         @ javax.security.auth.subject.doas(subject.java:415)         @ org.apache.hadoop.security.usergroupinformation.doas(usergroupinformation.java:1594)         @ org.apache.hadoop.mapred.yarnchild.main(yarnchild.java:163)     caused by: org.apache.hadoop.hive.ql.metadata.hivefatalexception:      [error 20004]: fatal error occurred when node tried create many dynamic partitions.      maximum number of dynamic partitions controlled hive.exec.max.dynamic.partitions , hive.exec.max.dynamic.partitions.pernode.      maximum set to: 20000          @ org.apache.hadoop.hive.ql.exec.filesinkoperator.getdynoutpaths(filesinkoperator.java:747)         @ org.apache.hadoop.hive.ql.exec.filesinkoperator.startgroup(filesinkoperator.java:829)         @ org.apache.hadoop.hive.ql.exec.operator.defaultstartgroup(operator.java:498)         @ org.apache.hadoop.hive.ql.exec.operator.startgroup(operator.java:521)         @ org.apache.hadoop.hive.ql.exec.mr.execreducer.reduce(execreducer.java:232)         ... 7 more      container killed applicationmaster.     container killed on request. exit code 137     container exited non-zero exit code 137       failed: execution error, return code 2 org.apache.hadoop.hive.ql.exec.mr.mapredtask     mapreduce jobs launched:      job 0: map: 520  reduce: 140   cumulative cpu: 7409.394 sec   hdfs read: 0 hdfs write: 393345977 success     job 1: map: 9  reduce: 1   cumulative cpu: 87.201 sec   hdfs read: 393359417 hdfs write: 0 fail     total mapreduce cpu time spent: 0 days 2 hours 4 minutes 56 seconds 595 msec 

can give ideas how calculate how many of these dynamic nodes might need job this?

or maybe should doing differently? running hive 0.13 way on azure hdinsight.

update:

  • corrected of numbers above.
  • reduced 3 streams operating on 211k records , succeeded.
  • started experimenting, reduced partitions per node 5k, , 1k, , still succeeded.

so not blocked anymore, thinking have needed millions of nodes whole dataset in 1 go (which wanted do).

dynamic partition columns must specified last among columns in select statement during insertion in sensor_part_qhr.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -