Every version is a record for a rowkey. When you say, a row has to be
deleted, all the versions of the row have to be deleted and all versions go
as a record in file and they should be marked so that when compaction runs,
the merged file doesn't contain the deleted records. I am ready to be
wronged, but let any committer comment on this. I am too new to HBase.
Thanks,
Jahangir Mohammed.
private void prepareDelete(Delete delete) throws IOException {
// Check to see if this is a deleteRow insert
if(delete.getFamilyMap().isEmpty()){
for(byte [] family : this.htableDescriptor.getFamiliesKeys()){
// Don't eat the timestamp
delete.deleteFamily(family, delete.getTimeStamp());
}
} else {
for(byte [] family : delete.getFamilyMap().keySet()) {
if(family == null) {
throw new NoSuchColumnFamilyException("Empty family is invalid");
}
checkFamily(family);
}
}
}
On Sat, Nov 26, 2011 at 2:47 AM, yonghu <[email protected]> wrote:
> But I just considered about the efficiency. Why HBase does not directly
> write a tombstone to row key instead of for each cell?
>
> regards
>
> Yong
>
> On Sat, Nov 26, 2011 at 8:11 AM, Jahangir Mohammed
> <[email protected]>wrote:
>
> > Tombstone. Same as cell.
> >
> > Thanks,
> > Jahangir Mohammed.
> >
> > On Sat, Nov 26, 2011 at 1:14 AM, yonghu <[email protected]> wrote:
> >
> > > hello,
> > >
> > > I read http://hbase.apache.org/book/versions.html and have a question
> > > about
> > > delete operation. As it mentions, the user can delete a whole row or
> > delete
> > > a data version of cell. The delete operation of data version of cell is
> > > just to write a tombstone marker for that version. I want to know how
> > about
> > > delete a row? Does HBase deletes the row immediately? or use the same
> > > strategy as deleting a data version which create a tombstone for that
> row
> > > key? Or create a tombstone for every data version belongs to that row?
> > >
> > > regards
> > >
> > > Yong
> > >
> >
>