phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Samarth Jain <sama...@apache.org>
Subject Re: Can't add views on HBase tables after upgrade
Date Mon, 14 Sep 2015 23:31:36 GMT
Jeffrey,

Can you tell us how are creating your view over the existing HBase table?
For example this works for me:

HBase shell:

create 'T', 'f1', 'f2', 'f3'

Phoenix sql line:

create view T ("f1".col1 INTEGER)

Note that HBase shell is case sensitive. So we need to put the family name
f1 in double quotes.


The below however isn't supported:

CREATE VIEW T_VIEW AS SELECT * FROM T;

On Sat, Sep 12, 2015 at 8:00 PM, James Taylor <jamestaylor@apache.org>
wrote:

> If we've broken views over HBase tables, we'll need to -1 the RC and get a
> fix IMO. Thanks in advance for offering to look into it, Samarth.
>
> On Sat, Sep 12, 2015 at 11:22 AM, Samarth Jain <samarth@apache.org> wrote:
>
>> Jeffrey,
>>
>> I will look into this and get back to you.
>>
>> - Samarth
>>
>> On Thu, Sep 10, 2015 at 8:44 AM, Jeffrey Lyons <Jeffrey.Lyons@d2l.com>
>> wrote:
>>
>>> Hey all,
>>>
>>>
>>>
>>> I have recently tried upgrading my Phoenix version from 4.4-HBase-0.98
>>> to build 835 on 4.x-HBase-0.98 to get some of the new changes. After the
>>> upgrade it seems that I can’t add new views directly over raw HBase tables,
>>> though it seems to work fine over Phoenix tables or views.
>>>
>>>
>>>
>>> The error it gives when I try to add a view is:
>>>
>>>
>>>
>>> Error: ERROR 1012 (42M03): Table undefined. tableName=<myTable>
>>> (state=42M03,code=1012)
>>>
>>> org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03):
>>> Table undefined. tableName=<myTable>
>>>
>>>         at
>>> org.apache.phoenix.schema.PMetaDataImpl.getTable(PMetaDataImpl.java:260)
>>>
>>>         at
>>> org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:1655)
>>>
>>>         at
>>> org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:751)
>>>
>>>         at
>>> org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:186)
>>>
>>>         at
>>> org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:315)
>>>
>>>         at
>>> org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:307)
>>>
>>>         at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>>>
>>>         at
>>> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:305)
>>>
>>>         at
>>> org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1375)
>>>
>>>         at sqlline.Commands.execute(Commands.java:822)
>>>
>>>         at sqlline.Commands.sql(Commands.java:732)
>>>
>>>         at sqlline.SqlLine.dispatch(SqlLine.java:808)
>>>
>>>         at sqlline.SqlLine.begin(SqlLine.java:681)
>>>
>>>         at sqlline.SqlLine.start(SqlLine.java:398)
>>>
>>>         at sqlline.SqlLine.main(SqlLine.java:292)
>>>
>>>
>>>
>>> (myTable is an Hbase table name in this case)
>>>
>>>
>>>
>>> Any advice, or could this just be an issue with the current state of the
>>> code?
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Jeff
>>>
>>
>>
>

Mime
View raw message