You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Chinmay Kulkarni (Jira)" <ji...@apache.org> on 2019/12/21 00:58:06 UTC

[jira] [Closed] (PHOENIX-5180) Add API to PhoenixRunTime to get ptable of a tenant using a global connection

     [ https://issues.apache.org/jira/browse/PHOENIX-5180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chinmay Kulkarni closed PHOENIX-5180.
-------------------------------------

Bulk closing Jiras for the 4.15.0 release.

> Add API to PhoenixRunTime to get ptable of a tenant using a global connection
> -----------------------------------------------------------------------------
>
>                 Key: PHOENIX-5180
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5180
>             Project: Phoenix
>          Issue Type: New Feature
>            Reporter: Thomas D'Silva
>            Assignee: Abhishek Singh Chouhan
>            Priority: Major
>              Labels: SFDC
>             Fix For: 4.15.0, 5.1.0
>
>         Attachments: PHOENIX-5180-master.patch
>
>
> If we want to look up the PTable of a tenant view we currently need to create a tenant specific connection and call {{PhoenixRuntime.getTable()}}. This could be inefficient if we need to create millions of tenant specific connections.
> We could instead just pass in the tenant id and use a global connection
>  {{getTable(Connection conn, String tenantId, String fullTableName, long timestamp)}}
> Insread of using the scn from the connection to set the clientTimestamp, we would use the passed in timestamp.
> If the table isn't cached we would need to make a rpc to fetch the table from SYSTEM.CATALOG
> {code:java}
> MetaDataMutationResult result = new MetaDataClient(pconn).updateCache(PName tenantId, String schemaName, String tableName)
> {code}
> FYI [~andrew.purtell@gmail.com]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)