You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2015/02/10 19:24:12 UTC
[jira] [Resolved] (PHOENIX-1620) Add API for getting tenant ID from
an HBase row of a Phoenix table
[ https://issues.apache.org/jira/browse/PHOENIX-1620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Taylor resolved PHOENIX-1620.
-----------------------------------
Resolution: Fixed
Fix Version/s: 4.3
Assignee: James Taylor
> Add API for getting tenant ID from an HBase row of a Phoenix table
> ------------------------------------------------------------------
>
> Key: PHOENIX-1620
> URL: https://issues.apache.org/jira/browse/PHOENIX-1620
> Project: Phoenix
> Issue Type: Bug
> Reporter: James Taylor
> Assignee: James Taylor
> Fix For: 4.3
>
> Attachments: 1620.patch, 1620_v2.patch
>
>
> Provide a means for HBase-level tools to get the tenant ID from an HBase row of any Phoenix table by adding the following method to PhoenixRuntime:
> public static Expression getTenantIdExpression(PhoenixConnection conn, String fullTableName);
> Then you'd call this once to get back an Expression which could be used again and again to get the tenantId from a List<Cell>, like this:
> Tuple tuple = new MultiKeyValueTuple();
> ImmutableBytesWritable ptr = new ImmutableBytesWritable();
> Expression expression = PhoenixRuntime.getTenantIdExpression(conn, fullTableName);
> while (more rows) {
> List<Cell> cells = get cells from row
> tuple.setKeyValues(cells);
> expression.evaluate(tuple, ptr);
> // At this point ptr would point to the tenant ID with its offset and length
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)