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

Create a metastore check command

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.3.0
    • Metastore
    • None
    • Reviewed
    • HIVE-142. Add a metastore check command. (Johan Oskarsson via zshao)

    Description

      We need a command to verify that the information in the metastore reflects the data that is on hdfs. For example partitions can be deleted on hdfs but still be in the metastore.

      From Joydeep Sen Sarma, see ticket HIVE-126 for the full comment:
      for a command line interface - one might want to check the entire database or just a table or even just one partition. other metadata checks will also be added over time (for example - do the file types on disk agree with metadata records, bucketing information etc). So, here's a strawman proposal for a new command:

      alter table <DB>[.TABLE [PARTITION-SPEC]] check [TYPE-LIST]

      where TYPE by default is 'all' (check for all kinds of errors), but can be specified to a specific type. For example - in this case - we can have a type called 'partitions' (and then over time we can add other types like 'fileformat' etc.). for v1 - we can just drop the type-list altogether.

      the check command can produce a list of things that need to be done to fix the format (like adding any directories not in the metastore - but in hdfs - to the metastore). actually performing of such steps would require a user confirmation (y/n).

      Attachments

        1. HIVE-142.patch
          42 kB
          Johan Oskarsson
        2. HIVE-142.patch
          42 kB
          Johan Oskarsson
        3. HIVE-142.patch
          42 kB
          Johan Oskarsson
        4. HIVE-142.patch
          41 kB
          Johan Oskarsson
        5. HIVE-142.patch
          41 kB
          Johan Oskarsson
        6. HIVE-142.patch
          50 kB
          Johan Oskarsson

        Issue Links

          Activity

            People

              johanoskarsson Johan Oskarsson
              johanoskarsson Johan Oskarsson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: