phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akshita Malhotra (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-3475) MetaData #getTables() API doesn't return view indexes
Date Fri, 11 Nov 2016 03:42:58 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-3475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15656021#comment-15656021
] 

Akshita Malhotra commented on PHOENIX-3475:
-------------------------------------------

Yes, I am looking for Phoenix metadata. As per my understanding, the data corresponding to
a view on an index is stored in the base index table (_IDX_<base table name>) and there
is no HTable which map to a view index name (globalViewIdx in the above test scenario). Therefore,
to migrate view indexes we need to copy data in the base index table similar to what we do
in case of views, copying over rows in SYSTEM.CATALOG

For example:
When I run #getTables("","", "_IDX_MIGRATIONTEST", new String[] {"INDEX","TABLE"}), it returns
empty result set. 
How can I get metadata corresponding to this table?

> MetaData #getTables() API doesn't return view indexes
> -----------------------------------------------------
>
>                 Key: PHOENIX-3475
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3475
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Akshita Malhotra
>             Fix For: 4.9.0
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message