phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eli Levine <elilev...@gmail.com>
Subject Re: Phoenix multi tenant
Date Tue, 08 Mar 2016 17:38:16 GMT
Phoenix assumes the first column in a multi-tenant table is the tenant id.
When using tenant-specific connections, Phoenix automatically adds a filter
on that column to the where clause.

In your example you probably have TenantId=TENANT1 on the connection. What
you are seeing is the result of Phoenix adding the tenant id filter to the
WHERE clause behind the scenes. That results in the scan being constrained
to that tenant's data in the rowkey.

Eli


On Tue, Mar 8, 2016 at 3:17 AM, Gaurav Agarwal <gaurav130403@gmail.com>
wrote:

> Hi
> Thanks for the reply . I tried to find that how this phoenix multi tenancy
> works internally in the core phoenix.
>
> As i debug it gives me two info
> 1. FIRSTKEYONFILTER
>
> 2 STARTROW:TENANT1
> STOPROW;TENANT1\\x01
>
> Do these thing have any impact on phoenix multi tenancy. Actually I am
> interested how without giving tenant id in where clause of a select query
> it is taking the connection tenantid and append it .
> On Mar 1, 2016 10:25 PM, "Eli Levine" <elilevine@gmail.com> wrote:
>
>> Hi Gaurav,
>>
>> Phoenix provides a way for multiple tenants to share a single table by
>> automatically sharding the tablespace by tenant id. This is done via
>> tenant-specific views. You should create a multi-tenant table over a
>> regular connection (no TenantId). When you open a tenant-specific
>> connection (by setting the TenantId property) you can create views for that
>> tenant over existing multi-tenant tables.
>>
>> More info here: http://phoenix.apache.org/multi-tenancy.html
>>
>> Cheers,
>>
>> Eli
>>
>>
>> On Tue, Mar 1, 2016 at 5:49 AM, Gaurav Agarwal <gaurav130403@gmail.com>
>> wrote:
>>
>>> I am trying to create phoenix multi tenant table with jdbc code .in the
>>> properties give tenant I'd as phoenixruntime.tenantId . Whentried to create
>>> table got exception as cannot create table with phoenix tenant connection
>>>
>>> Any solution
>>> On Mar 1, 2016 3:20 PM, "Gaurav Agarwal" <gaurav130403@gmail.com> wrote:
>>>
>>>> Hi
>>>>
>>>> Whether Phoenix provide multi tenant architecture in phoenix 4.2.2 and
>>>> 4.4.
>>>>
>>>> hbase provides namespace creation and assign tables to that namespace .
>>>> Can we have the workaround in phoenix
>>>>
>>>> Please confirm
>>>>
>>>
>>

Mime
View raw message