phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Taylor <jamestay...@apache.org>
Subject Re: How to drop table from Phoenix but preserve HBase table
Date Fri, 14 Feb 2014 00:19:09 GMT
Or you can do a query/scan at an earlier timestamp to see your data (i.e.
scan.setTimeRange(0,tsBeforeYouDeleted)). In Phoenix 3.0, we have extended
the VIEW capabilities: http://phoenix.incubator.apache.org/views.html

This might be more what you're looking for, as dropping a view would not
affect the data.

Just curious - can you tell me a bit more about your use case and why you
need to drop the phoenix table?

Thanks,
James


On Thu, Feb 13, 2014 at 4:08 PM, Justin Workman <justinjworkman@gmail.com>wrote:

> So is there not a way to drop the table in Phoenix and not drop/truncate
> the table and data in HBase? For this particular use case, this was a table
> already in HBase, and the data is static so we only have a single version
> of data in the table. So when we drop the table in Phoenix, the data is
> marked for deletion and we cannot see any data via HBase scan unless we do
> a RAW scan.
>
>
> On Thu, Feb 13, 2014 at 2:17 PM, James Taylor <jamestaylor@apache.org>wrote:
>
>> Yes, phoenix.schema.dropMetaData is a client-side setting.
>>
>> You can create a VIEW instead of a TABLE and your data won't be deleted.
>> However, performance won't be as good as with a TABLE under some
>> circumstances. Also, you wouldn't be able to use mutable secondary indexing
>> with VIEWs. Note also, the old data is still there - we've just added
>> Delete markers. You can actually connect at an "earlier" timestamp and
>> continue to query the old data:
>> http://phoenix.incubator.apache.org/faq.html#/Can_phoenix_work_on_tables_with_arbitrary_timestamp_as_flexible_as_HBase_API
>>
>> Thanks,
>> James
>>
>>
>> On Thu, Feb 13, 2014 at 1:11 PM, Justin Workman <justinjworkman@gmail.com
>> > wrote:
>>
>>> I'm looking for some guidance on the proper way to drop a table from
>>> Phoenix yet preserve the underlying HBase table and data? I have read here,
>>> https://github.com/forcedotcom/phoenix/issues/219, that I should be
>>> able to set a value to false and have the table preserved in HBase. Is this
>>> a client side or server side setting?
>>>
>>> I added that value, phoenix.schema.dropMetaData, to my clients
>>> hbase-site.xml and set it to false and when I dropped the table in Phoenix,
>>> it did preserve the table in HBase, however it truncated all of the data.
>>>
>>> Is there anyway to preserve both the table and data when dropping a
>>> table in Phoenix?
>>>
>>>
>>
>

Mime
View raw message