You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Samarth Jain (JIRA)" <ji...@apache.org> on 2015/11/13 00:55:11 UTC

[jira] [Commented] (PHOENIX-2409) Create getTable() convenience method on PhoenixConnection

    [ 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)