You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Leif Wickland <le...@gmail.com> on 2011/08/10 22:27:08 UTC

Can I write a KeyValue with Type.Delete to HFileOutputFormat?

I tried writing a KeyValue initialized with its type set to Delete or
DeleteColumn to HFileOutputFormat.  When reading the table afterward, it
appears that the cell was not deleted.

Is it possible to write a delete when writing to the HFileOutputFormat?

Thanks,

Leif Wickland

Re: Can I write a KeyValue with Type.Delete to HFileOutputFormat?

Posted by Leif Wickland <le...@gmail.com>.
Turns out, DeleteColumn type KeyValues can be output to HFileOutputFormat.
 To make it work correctly, I needed to use HConstants.LATEST_TIMESTAMP when
constructing the KeyValue.

It appears to me that KeyValue.Type.Delete corresponds to
Delete.deleteColumn() and KeyValue.Type.DeleteColumn corresponds to
Delete.deleteColumns, which is somewhat non-obvious and appears to be
undocumented.

On Wed, Aug 10, 2011 at 2:27 PM, Leif Wickland <le...@gmail.com>wrote:

> I tried writing a KeyValue initialized with its type set to Delete or
> DeleteColumn to HFileOutputFormat.  When reading the table afterward, it
> appears that the cell was not deleted.
>
> Is it possible to write a delete when writing to the HFileOutputFormat?
>
> Thanks,
>
> Leif Wickland
>