You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Michael Segel <mi...@hotmail.com> on 2010/07/28 21:04:32 UTC
Sanity check on inserts...
All,
Just wanting to be safe...
Suppose I have a Column family that has the following columns:
foo and bar.
(CF:foo, CF:bar)
So in my table I have a row:
Row_key | CF:foo CF:bar
Alpha | foo_val1 bar_val1
Later, I update the row with new data including a new column CF:retz
So I have the following:
Row_key | CF:foo CF:bar CF:retz
Alpha | foo_valX bar_valX some_value
Later, I'm asked to restore the row from a back up.
So when I re-insert the row with the row_key Alpha
( Alpha | foo_val1 bar_val1)
will I have :
Row_key | CF:foo CF:bar
Alpha | foo_val1 bar_val1
or:
Row_key | CF:foo CF:bar CF:retz
Alpha | foo_val1 bar_val1 some_value
I imagine that when I write out a column family, I'm inserting the whole row so I wouldn't see anything in the column (CF:retz) but I want to do a sanity check.
Thx
-Mike
_________________________________________________________________
Hotmail is redefining busy with tools for the New Busy. Get more from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2
Re: Sanity check on inserts...
Posted by Jean-Daniel Cryans <jd...@apache.org>.
No such thing as "inserting a whole row", the new values will just be
put on top of the others, and you will see some_value.
You would need to issue a deleteAll on that family before restoring the backup.
J-D
On Wed, Jul 28, 2010 at 12:04 PM, Michael Segel
<mi...@hotmail.com> wrote:
>
> All,
>
> Just wanting to be safe...
>
> Suppose I have a Column family that has the following columns:
> foo and bar.
> (CF:foo, CF:bar)
>
> So in my table I have a row:
>
> Row_key | CF:foo CF:bar
> Alpha | foo_val1 bar_val1
>
>
>
> Later, I update the row with new data including a new column CF:retz
> So I have the following:
>
> Row_key | CF:foo CF:bar CF:retz
>
> Alpha | foo_valX bar_valX some_value
>
>
> Later, I'm asked to restore the row from a back up.
>
> So when I re-insert the row with the row_key Alpha
> ( Alpha | foo_val1 bar_val1)
>
> will I have :
> Row_key | CF:foo CF:bar
>
> Alpha | foo_val1 bar_val1
>
> or:
>
> Row_key | CF:foo CF:bar CF:retz
>
>
> Alpha | foo_val1 bar_val1 some_value
>
>
> I imagine that when I write out a column family, I'm inserting the whole row so I wouldn't see anything in the column (CF:retz) but I want to do a sanity check.
>
> Thx
>
> -Mike
>
>
> _________________________________________________________________
> Hotmail is redefining busy with tools for the New Busy. Get more from your inbox.
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2