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

Samarth Jain commented on PHOENIX-2409:
---------------------------------------

Would it be better to instead have the callers just pass in the full table name 
and let the method in PhoenixConnection form the PTableKey itself ?

{code}
public PTable getTable(String fullTableName) throws TableNotFoundException {
+        PTableKey key = new PTableKey(tenantId, fullTableName);
+        return metaData.getTable(key);
+    }

and the callers can then just do:
phxConn.getTable(fullTableName)
{code}


> Create getTable() convenience method on PhoenixConnection
> ---------------------------------------------------------
>
>                 Key: PHOENIX-2409
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2409
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: James Taylor
>         Attachments: PHOENIX-2409.patch
>
>
> Instead of always typing conn.getMetaDataCache().getTable(...), I'd like to 
> just type conn.getTable(...) and have it delegate to the cache.



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

Reply via email to