phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Purtell (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-5180) Add API to PhoenixRunTime to get ptable of a tenant using a global connection
Date Fri, 08 Mar 2019 21:38:00 GMT


Andrew Purtell commented on PHOENIX-5180:

Please also add this related API:
getTable(Connection conn, String tenantId, String fullTableName)
which can be implemented using the other. (Make a timestamp of 0 or -1 mean "get the latest",
something like that.) The requested convenience method here is for callers who want the current
schema for the table. 

> Add API to PhoenixRunTime to get ptable of a tenant using a global connection
> -----------------------------------------------------------------------------
>                 Key: PHOENIX-5180
>                 URL:
>             Project: Phoenix
>          Issue Type: New Feature
>            Reporter: Thomas D'Silva
>            Assignee: Abhishek Singh Chouhan
>            Priority: Major
>              Labels: SFDC
> 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 []

This message was sent by Atlassian JIRA

View raw message