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

exported metadata by HIVE-3068 cannot be imported because of wrong file name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.11.0
    • 0.12.0
    • Query Processor
    • None

    Description

      Symptom

      When DROP TABLE a table, metadata of the table is generated to be able to import the dropped table again.
      However, the exported metadata name is '<table name>.metadata'.
      Since ImportSemanticAnalyzer allows only '_metadata' as metadata filename, user have to rename the metadata file to import the table.

      How to reproduce

      Set the following setting to hive-site.xml:

       <property>
         <name>hive.metastore.pre.event.listeners</name>
         <value>org.apache.hadoop.hive.ql.parse.MetaDataExportListener</value>
       </property>
      

      Then run the following queries:

      > CREATE TABLE test_table (id INT, name STRING);
      > DROP TABLE test_table;
      > IMPORT TABLE test_table_imported FROM '/path/to/metadata/file';
      FAILED: SemanticException [Error 10027]: Invalid path
      

      Attachments

        1. HIVE-4299.1.patch.txt
          2 kB
          Edward Capriolo
        2. HIVE-4299.4.patch.txt
          3 kB
          Edward Capriolo
        3. HIVE-4299.5.patch.txt
          3 kB
          Edward Capriolo
        4. HIVE-4299.patch
          0.8 kB
          Sho Shimauchi

        Issue Links

          Activity

            People

              appodictic Edward Capriolo
              sho.shimauchi Sho Shimauchi
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: