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

Hive replication can add duplicate data during migration to a target with hive.strict.managed.tables enabled

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • repl

    Description

      During bootstrap phase it may happen that the files copied to target are created by events which are not part of the bootstrap. This is because of the fact that, bootstrap first gets the last event id and then the file list. During this period if some event are added, then bootstrap will include files created by these events also.The same files will be copied again during the first incremental replication just after the bootstrap. In normal scenario, the duplicate copy does not cause any issue as hive allows the use of target database only after the first incremental. But in case of migration, the file at source and target are copied to different location (based on the write id at target) and thus this may lead to duplicate data at target. This can be avoided by having at check at load time for duplicate file. This check can be done only for the first incremental and the search can be done in the bootstrap directory (with write id 1). if the file is already present then just ignore the copy.

      Attachments

        1. HIVE-21197.01.patch
          55 kB
          mahesh kumar behera
        2. HIVE-21197.02.patch
          55 kB
          mahesh kumar behera
        3. HIVE-21197.03.patch
          65 kB
          mahesh kumar behera
        4. HIVE-21197.04.patch
          74 kB
          mahesh kumar behera
        5. HIVE-21197.05.patch
          77 kB
          mahesh kumar behera

        Issue Links

          Activity

            People

              maheshk114 mahesh kumar behera
              maheshk114 mahesh kumar behera
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 22.5h
                  22.5h