Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-3475

MetaData #getTables() API doesn't return view indexes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • None
    • 4.15.0
    • None
    • None
    • Patch

    Description

      HBase migration tool uses DatabaseMetadata#getTables() API to retrieve the tables for copying data. We have found that API doesn't return base index tables ( IDX<base table name>)

      For testing purposes, we issue following DDL to generate the view and the corresponding view index:
      -CREATE VIEW IF NOT EXISTS MIGRATIONTEST_VIEW (OLD_VALUE_VIEW varchar) AS SELECT * FROM MIGRATIONTEST WHERE OLD_VALUE like 'E%'
      -CREATE INDEX IF NOT EXISTS MIGRATIONTEST_VIEW_IDX ON MIGRATIONTEST_VIEW (OLD_VALUE_VIEW)

      By using HBase API, we were able to confirm that base index table (_IDX_MIGRATIONTEST) is created.

      Both jdbc DatabaseMetadata API and P* getMetaDataCache API doesn't seem to be returning view indexes. Also P*MetaData #getTableRef API return "TableNotFoundException" when attempted to fetch PTable corresponding to the base index table name.

      Attachments

        Activity

          People

            Unassigned Unassigned
            akshita.malhotra Akshita Malhotra
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: