Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.13.0
-
Added the new config to https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties
Description
The current implementation of dynamic partition works by keeping at least one record writer open per dynamic partition directory. In case of bucketing there can be multispray file writers which further adds up to the number of open record writers. The record writers of column oriented file format (like ORC, RCFile etc.) keeps some sort of in-memory buffers (value buffer or compression buffers) open all the time to buffer up the rows and compress them before flushing it to disk. Since these buffers are maintained per column basis the amount of constant memory that will required at runtime increases as the number of partitions and number of columns per partition increases. This often leads to OutOfMemory (OOM) exception in mappers or reducers depending on the number of open record writers. Users often tune the JVM heapsize (runtime memory) to get over such OOM issues.
With this optimization, the dynamic partition columns and bucketing columns (in case of bucketed tables) are sorted before being fed to the reducers. Since the partitioning and bucketing columns are sorted, each reducers can keep only one record writer open at any time thereby reducing the memory pressure on the reducers. This optimization is highly scalable as the number of partition and number of columns per partition increases at the cost of sorting the columns.
Attachments
Attachments
Issue Links
- is related to
-
HIVE-5169 Sorted Bucketed Partitioned Insert does not sort by dynamic partition column causing reducer OOMs/lease-expiry errors
- Resolved
- relates to
-
HIVE-13773 Stats state is not captured correctly in dynpart_sort_optimization_acid.q
- Patch Available
-
HIVE-8151 Dynamic partition sort optimization inserts record wrongly to partition when used with GroupBy
- Closed
-
HIVE-7012 Wrong RS de-duplication in the ReduceSinkDeDuplication Optimizer
- Closed
-
SPARK-14044 Allow configuration of DynamicPartitionWriterContainer#writeRows to bypass sort step
- Resolved
- supercedes
-
HIVE-5169 Sorted Bucketed Partitioned Insert does not sort by dynamic partition column causing reducer OOMs/lease-expiry errors
- Resolved
-
HIVE-5170 Sorted Bucketed Partitioned Insert hard-codes the reducer count == bucket count
- Resolved
- links to