accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Fuchs <afu...@apache.org>
Subject Re: Change column family
Date Tue, 26 May 2015 15:03:12 GMT
This can also be done with a row-doesn't-fit-into-memory constraint. You
won't need to hold the second column in-memory if your iterator tree deep
copies, filters, transforms and merges. Exhibit A:

[HeapIterator-derivative]
   |_________________________
   |                         \
[transform-graph1-to-graph2]  \
   |                           \
[column-family-graph1]     [all-but-column-family-graph1]

With this design, you can subclass the HeapIterator, deep copy the source
in the init method, wrap one in a custom transform iterator, and create a
appropriate seek method. This is probably more on the advanced side of
Accumulo programming, but can be done.

Adam


On Tue, May 26, 2015 at 8:59 AM, Eric Newton <eric.newton@gmail.com> wrote:

> Short answer: no.
>
> Long answer: maybe.
>
> You can write an iterator which will transform:
>
> row, cf1, cq, vis -> value
>
> into:
>
> row, cf2, cq, vis -> value
>
> And if you can do this while maintaining sort order, you can get your new
> ColumnFamily transformed during scans and compactions.
>
> But this bit about maintaining the sort order is more complex than it
> sounds.
>
> If you have the following:
>
> row, a, cq, vis -> value
> row, aa, cq, vis -> value
>
>
> And you want to transform cf "a" into cf "b":
>
> row, aa, cq, vis -> value
> row, b, cq, vis -> value
>
>
> Your iterator needs to hold the second column in memory, after
> transforming the first column.  Tablet server memory for holding Key/Values
> is not infinite.
>
> -Eric
>
> On Tue, May 26, 2015 at 8:44 AM, shweta.agrawal <shweta.agrawal@orkash.com
> > wrote:
>
>> Hi,
>>
>> I want to ask, is it possible in accumulo to change the column family
>> without changing the whole data.
>>
>> Suppose my column family is graph1, now i want to rename this column
>> family as graph2.
>> Is it possible?
>>
>> Thanks
>> Shweta
>>
>
>

Mime
View raw message