hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Soldatov <sergeysolda...@gmail.com>
Subject Re: Struggles around Cell#getType()
Date Thu, 26 Oct 2017 23:34:47 GMT
DataType class was introduced as part of HBASE-8693 which is more about the
type of data in the cell rather than the type of mutation.

Thanks,
Sergey

On Thu, Oct 26, 2017 at 3:40 PM, Josh Elser <elserj@apache.org> wrote:

> Hiya,
>
> (Background: see HBASE-19002)
>
> In trying to write some example Observers, I found myself in a pickle: how
> do I tell if a Cell is a Put?
>
> * Cell#getType() returns a byte which corresponds to a KeyValue.Type
> * KeyValue.Type has API to convert a byte to Type
> * KeyValue (and thus KeyValue.Type) is IA.Private
> * DataType o.a.h.h.typesDataType _appears to me_ to be the replacement for
> the KeyValue.Type
>
> Best as I can tell, Cell#getType() should be deprecated and we should have
> some kind of API (method on Cell or CellUtil) which returns a DataType
> instead of Type. The details of the byte and the KeyValue.Type should be
> hidden inside the implementation.
>
> My hunch is that this is an accidental omission, but Stack recommended
> that I "ask the class" ;). What have I missed? I think this is trivial to
> fix; obviously, I don't want to make a fix if I just didn't look hard
> enough.
>
> Thanks!
>
> - Josh
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message