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

Improve hive-hcatalog-streaming extensibility and support updates and deletes.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.0
    • 2.0.0
    • HCatalog
    • Expanded streaming API to include update and delete operations and support merge type processes.

    Description

      Overview

      I'd like to extend the hive-hcatalog-streaming API so that it also supports the writing of record updates and deletes in addition to the already supported inserts.

      Motivation

      We have many Hadoop processes outside of Hive that merge changed facts into existing datasets. Traditionally we achieve this by: reading in a ground-truth dataset and a modified dataset, grouping by a key, sorting by a sequence and then applying a function to determine inserted, updated, and deleted rows. However, in our current scheme we must rewrite all partitions that may potentially contain changes. In practice the number of mutated records is very small when compared with the records contained in a partition. This approach results in a number of operational issues:

      • Excessive amount of write activity required for small data changes.
      • Downstream applications cannot robustly read these datasets while they are being updated.
      • Due to scale of the updates (hundreds or partitions) the scope for contention is high.

      I believe we can address this problem by instead writing only the changed records to a Hive transactional table. This should drastically reduce the amount of data that we need to write and also provide a means for managing concurrent access to the data. Our existing merge processes can read and retain each record's ROW_ID/RecordIdentifier and pass this through to an updated form of the hive-hcatalog-streaming API which will then have the required data to perform an update or insert in a transactional manner.

      Benefits

      • Enables the creation of large-scale dataset merge processes
      • Opens up Hive transactional functionality in an accessible manner to processes that operate outside of Hive.

      Attachments

        1. HIVE-10165.0.patch
          159 kB
          Elliot West
        2. HIVE-10165.4.patch
          183 kB
          Elliot West
        3. HIVE-10165.5.patch
          185 kB
          Elliot West
        4. mutate-system-overview.png
          106 kB
          Elliot West
        5. HIVE-10165.6.patch
          183 kB
          Elliot West
        6. HIVE-10165.7.patch
          184 kB
          Elliot West
        7. HIVE-10165.9.patch
          202 kB
          Elliot West
        8. HIVE-10165.10.patch
          213 kB
          Elliot West

        Issue Links

          Activity

            People

              teabot Elliot West
              teabot Elliot West
              Votes:
              2 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: