[
https://issues.apache.org/jira/browse/PHOENIX-1620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14310332#comment-14310332
]
Hudson commented on PHOENIX-1620:
---------------------------------
SUCCESS: Integrated in Phoenix-master #581 (See
[https://builds.apache.org/job/Phoenix-master/581/])
PHOENIX-1620 Add API for getting tenant ID from an HBase row of a Phoenix table
(jtaylor: rev f3c675bf735d7d4e4534433f3406af15360ed5d9)
* phoenix-core/src/test/java/org/apache/phoenix/util/PhoenixRuntimeTest.java
* phoenix-core/src/main/java/org/apache/phoenix/util/SchemaUtil.java
* phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java
* phoenix-core/src/it/java/org/apache/phoenix/end2end/PhoenixRuntimeIT.java
* phoenix-core/src/main/java/org/apache/phoenix/util/PhoenixRuntime.java
> 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
> 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)