You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by venk sham <sh...@gmail.com> on 2016/12/06 17:50:56 UTC

phoenix upgrade issue

while upgrading phoenix from 4.6.1 to 4.8.1.



While connection is getting initialized, it’s trying to upgrader system
tables with missing columns related to 4.7 and 4.8. While altering
SYSTEM.CATALOG to add the columns related to 4.7 and 4.8   facing the
following issues.



1.       Its throwing  “NEWER_TABLE_FOUND“ and the columns are not being
added.

2.  Its trying to disable Indexes on Views during this process its adding
“_IDX_” to the physical table of the view. Whereas at HBase side the table
would be “_LOCAL_IDX” because of this reason it’s not able to find the
table and throwing the exception.





Thanks

Venkat

Re: phoenix upgrade issue

Posted by venk sham <sh...@gmail.com>.
Thanks James,

I tried to debug to find the newer time stamps.
 (final PTable pdataTable = PhoenixRuntime.getTable(connection,
"SYSTEM.CATALOG") ) when I inspect the timestamp its showing as 0.

Can you please let me know how can find the newer timestamps which are
causing the issue.

Thanks
Venkat

On Tue, Dec 6, 2016 at 12:01 PM, James Taylor <ja...@apache.org>
wrote:

> Hi Venkat,
> Did you ever update the SYSTEM.CATALOG table manually? If so, did you set
> the CURRENT_SCN property on the connection so that the timestamp of the
> modified rows continue to have the required timestamp
> (MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_6_0 or 9 in this case)? It
> sounds like you have cells with newer timestamps which will cause the
> upgrade to not happen correctly.
>
> Not sure about (2), but maybe Rajeshbabu would know.
>
> Another alternative to the automatic upgrade is to just disable and drop
> the SYSTEM.CATALOG table as well as any indexes from the HBase shell and
> rerun all your DDL statements. When you create a Phoenix table, it will map
> to existing HBase table data, so you won't lose data. Phoenix will think it
> needs to add an empty key value cell to each row, but you could get around
> this by setting the CURRENT_SCN property to the long value that represents
> the current time on the connection you're using to run the DDL statements.
> See https://phoenix.apache.org/faq.html#Can_phoenix_work_
> on_tables_with_arbitrary_timestamp_as_flexible_as_HBase_API for more info
> on the CURRENT_SCN property.
>
> Thanks,
> James
>
> On Tue, Dec 6, 2016 at 9:50 AM, venk sham <sh...@gmail.com> wrote:
>
>> while upgrading phoenix from 4.6.1 to 4.8.1.
>>
>>
>>
>> While connection is getting initialized, it’s trying to upgrader system
>> tables with missing columns related to 4.7 and 4.8. While altering
>> SYSTEM.CATALOG to add the columns related to 4.7 and 4.8   facing the
>> following issues.
>>
>>
>>
>> 1.       Its throwing  “NEWER_TABLE_FOUND“ and the columns are not being
>> added.
>>
>> 2.  Its trying to disable Indexes on Views during this process its
>> adding “_IDX_” to the physical table of the view. Whereas at HBase side the
>> table would be “_LOCAL_IDX” because of this reason it’s not able to find
>> the table and throwing the exception.
>>
>>
>>
>>
>>
>> Thanks
>>
>> Venkat
>>
>
>

Re: phoenix upgrade issue

Posted by James Taylor <ja...@apache.org>.
Hi Venkat,
Did you ever update the SYSTEM.CATALOG table manually? If so, did you set
the CURRENT_SCN property on the connection so that the timestamp of the
modified rows continue to have the required timestamp
(MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_6_0 or 9 in this case)? It
sounds like you have cells with newer timestamps which will cause the
upgrade to not happen correctly.

Not sure about (2), but maybe Rajeshbabu would know.

Another alternative to the automatic upgrade is to just disable and drop
the SYSTEM.CATALOG table as well as any indexes from the HBase shell and
rerun all your DDL statements. When you create a Phoenix table, it will map
to existing HBase table data, so you won't lose data. Phoenix will think it
needs to add an empty key value cell to each row, but you could get around
this by setting the CURRENT_SCN property to the long value that represents
the current time on the connection you're using to run the DDL statements.
See
https://phoenix.apache.org/faq.html#Can_phoenix_work_on_tables_with_arbitrary_timestamp_as_flexible_as_HBase_API
for more info on the CURRENT_SCN property.

Thanks,
James

On Tue, Dec 6, 2016 at 9:50 AM, venk sham <sh...@gmail.com> wrote:

> while upgrading phoenix from 4.6.1 to 4.8.1.
>
>
>
> While connection is getting initialized, it’s trying to upgrader system
> tables with missing columns related to 4.7 and 4.8. While altering
> SYSTEM.CATALOG to add the columns related to 4.7 and 4.8   facing the
> following issues.
>
>
>
> 1.       Its throwing  “NEWER_TABLE_FOUND“ and the columns are not being
> added.
>
> 2.  Its trying to disable Indexes on Views during this process its adding
> “_IDX_” to the physical table of the view. Whereas at HBase side the table
> would be “_LOCAL_IDX” because of this reason it’s not able to find the
> table and throwing the exception.
>
>
>
>
>
> Thanks
>
> Venkat
>