hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Daniel Cryans <jdcry...@apache.org>
Subject Re: What happens if HFile contains the key that already present?
Date Tue, 25 Oct 2011 16:43:48 GMT
Keep in mind that the timestamp is part of the key, and in your
descriptions you talk about "key" but in HBase there's multiple keys:
row key, family, qualifier and timestamp.

The rule in HBase is that the highest timestamp wins, so when you
import your HFiles they should normally have a higher time. Now let's
say you have qualifiers "a", "b" and "c" in row key "x" in one HFile
and then import another "x" with "c" and "d". The end result will be
"x" containing "a", "b", the latest "c" and "d".

Hope this helps,


On Tue, Oct 25, 2011 at 4:42 AM, Vladimir Klimontovich
<klimontovich@gmail.com> wrote:
> Well, my concern is that when data is stored internally in HFiles,
> each key belongs exactly to one file.
> So I'm wondering if HBase just adopts HFile during import or tries to
> merge it with others
> On Mon, Oct 24, 2011 at 10:17 PM, Ravikumar MAV <ravimav@gmail.com> wrote:
>> New row many have new version(ts) for each column value (unless table is
>> configured to have one version or both rows are generated with same version
>> ts). Atleast tsvimport generates new ts for this situation.
>> On Mon, Oct 24, 2011 at 10:53 AM, Vladimir Klimontovich <
>> klimontovich@gmail.com> wrote:
>>> Hello!
>>> Could please someone suggest how HBase behaves in following situation:
>>>  - I have a row with key K (row1) that already present in table.
>>>  - I'm running a mapreduce job which generates HFile that contains row
>>> with the same key K (row2)
>>>  - Will the data of this rows (row1 and row2) will be merged somehow
>>> or row2 will completely replace row1
>>>  - Almost the same case, but mapreduce job outputs too HFiles and each
>>> of them contains rows with same key K. Will rows be merged?
>>> Thanks!
>>> --
>>> Vladimir Klimontovich
>>> Cell: +7-926-890-2349, skype: klimontovich
>> --
>> - Ravi MAV
> --
> Vladimir Klimontovich
> Cell: +7-926-890-2349, skype: klimontovich

View raw message