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

Alter command execution "when HDFS is down" results in holding stale data in MetaStore

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.6.0
    • 0.7.0
    • Metastore
    • None
    • Hadoop 0.20.1, Hive0.6.0 and SUSE Linux Enterprise Server 10 SP2 (i586) - Kernel 2.6.16.60-0.21-smp (5).

    • Reviewed
    • HiveAlterHandler ( alterTable ) , In HDFS operation catch block added renaming the table name to old table name.

    Description

      Lets consider, the "DFS" is down ,

      And on executing an alter query say "alter table firsttable rename to secondtable".
      the query execution fails with the following exception:

      InvalidOperationException(message:Unable to access old location hdfs://localhost:9000/user/hive/warehouse/firsttable for table default.firsttable)

      Now after starting the DFS and then executing the same query , the client gets the following exception:

      NoSuchObjectException(message:default.firsttable table not found)

      Root Cause

      In Alter Query execution flow, first "MetaStore" operation is executed successfully and then "DFS" operation is started. In this scenario, "DFS" is down. As a result, execution of the query failed and partial information of the operation is saved.

      Attachments

        1. HIVE-1897.1.patch
          2 kB
          Chinna Rao Lalam

        Activity

          People

            chinnalalam Chinna Rao Lalam
            chinnalalam Chinna Rao Lalam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: