Uploaded image for project: 'HCatalog'
  1. HCatalog
  2. HCATALOG-451

Partitions are created even when Jobs are aborted

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.4, 0.5
    • 0.5, 0.4.1
    • mapreduce
    • None
    • Hadoop 1.0.2, non-dynamic partitions.

    Description

      If an MR job using HCatOutputFormat fails, and FileOutputCommitterContainer::abortJob() is called, one would expect that partitions aren't created/registered with HCatalog.

      When using dynamic-partitions, one sees that this behaves correctly. But when static-partitions are used, partitions are created regardless of whether the Job succeeded or failed.
      (This manifested as a failure when the job is repeated. The retry-job fails to launch since the partitions already exist from the last failed run.)

      This is a result of bad code in FileOutputCommitter::cleanupJob(), which seems to do an unconditional partition-add. This can be fixed by adding a check for the output directory before adding partitions (in the !dynamicParititoning case), since the directory is removed in abortJob().

      We'll have a patch for this shortly. As an aside, we ought to move the partition-creation into commitJob(), where it logically belongs. cleanupJob() is deprecated and common to both success and failure code paths.

      Attachments

        1. HCATALOG-451.0.patch
          11 kB
          Vandana Ayyalasomayajula
        2. HCATALOG-451-branch-0.4.patch
          34 kB
          Vandana Ayyalasomayajula
        3. HCATALOG-451-branch-0.4.02.patch
          45 kB
          Vandana Ayyalasomayajula
        4. HCATALOG-451-branch-0.4.03.patch
          45 kB
          Vandana Ayyalasomayajula
        5. HCAT-451-trunk.02.patch
          45 kB
          Vandana Ayyalasomayajula
        6. HCATALOG-451-0.3.patch
          51 kB
          Vandana Ayyalasomayajula
        7. HCATALOG-451-0.4.patch
          41 kB
          Vandana Ayyalasomayajula

        Issue Links

          Activity

            People

              avandana Vandana Ayyalasomayajula
              mithun Mithun Radhakrishnan
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: