Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-17935

Turn on hive.optimize.sort.dynamic.partition by default

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      The config option hive.optimize.sort.dynamic.partition is an optimization for Hive’s dynamic partitioning feature. It was originally implemented in HIVE-6455. 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 reducer can keep only one record writer open at any time thereby reducing the memory pressure on the reducers. There were some early problems with this optimization and it was disabled by default in HiveConf in HIVE-8151. Since then setting hive.optimize.sort.dynamic.partition=true has been used to solve problems where dynamic partitioning produces with (1) too many small files on HDFS, which is bad for the cluster and can increase overhead for future Hive queries over those partitions, and (2) OOM issues in the map tasks because it trying to simultaneously write to 100 different files.

      It now seems that the feature is probably mature enough that it can be enabled by default.

      Attachments

        1. HIVE-17935.1.patch
          208 kB
          Andrew Sherman
        2. HIVE-17935.2.patch
          208 kB
          Andrew Sherman
        3. HIVE-17935.3.patch
          217 kB
          Andrew Sherman
        4. HIVE-17935.4.patch
          392 kB
          Andrew Sherman
        5. HIVE-17935.5.patch
          392 kB
          Andrew Sherman
        6. HIVE-17935.6.patch
          396 kB
          Andrew Sherman
        7. HIVE-17935.7.patch
          396 kB
          Andrew Sherman
        8. HIVE-17935.8.patch
          90 kB
          Andrew Sherman

        Activity

          People

            Unassigned Unassigned
            asherman Andrew Sherman
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: