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

Creating a table stores the full address of namenode in the metadata. This leads to problems when the namenode address changes.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 0.5.0
    • None
    • Metastore, Query Processor
    • None
    • Any

    Description

      Here is an excerpt from table metadata for an arbitrary table table1:

      hive> describe extended table1;
      OK
      ...
      Detailed Table Information	...
      location:hdfs://localhost:9000/user/arvind/hive/warehouse/table1, 
      ...
      

      As can be seen, the full address of namenode is captured in the location information for the table. This information is later used to run any queries on the table - thus making it impossible to change the namenode location once the table has been created. For example, for the above table, a query will fail if the namenode is migrated from port 9000 to 8020:

      hive> select * from table1;
      OK
      Failed with exception java.io.IOException:java.net.ConnectException: Call to localhost/127.0.0.1:9000
      failed on connection exception: java.net.ConnectException: Connection refused
      Time taken: 10.78 seconds
      hive> 
      

      It should be possible to change the namenode location regardless of when the tables are created. Also, any query execution should work with the configured namenode at that point in time rather than requiring the configuration to be exactly the same at the time when the tables were created.

      Attachments

        Activity

          People

            Unassigned Unassigned
            aprabhakar Arvind Prabhakar
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: