Varun Saxena commented on YARN-4053:

bq. I'm just curious (and perhaps this is a totally dumb question for a HBase 
newbie), is there a way to specify that the value type is a numeric type when 
we create the table or the column family? Does HBase itself support something 
like that?
AFAIK, no there is no way to attach type with column qualifier or column 
family. HBase treats everything as just a sequence of bytes. It depends on the 
user how they encode or decode it.

bq. Another scenario to think about is what if users write metric values in an 
inconsistent manner. Suppose the user stored an integral value for a metric 
initially, but later attempted to store a floating value for the same metric. 
It sounds like it could be a silent failure? This should be a rare occurrence, 
but I think we need to give it some thought...
Yes I did consider this scenario. That is why I said we can place a restriction 
on client that it should send values in floating point format at all times if 
it wants to store some metric value as floating point. We can mention this in 
our documentation.

> Change the way metric values are stored in HBase Storage
> --------------------------------------------------------
>                 Key: YARN-4053
>                 URL: https://issues.apache.org/jira/browse/YARN-4053
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: timelineserver
>    Affects Versions: YARN-2928
>            Reporter: Varun Saxena
>            Assignee: Varun Saxena
>         Attachments: YARN-4053-YARN-2928.01.patch
> Currently HBase implementation uses GenericObjectMapper to convert and store 
> values in backend HBase storage. This converts everything into a string 
> representation(ASCII/UTF-8 encoded byte array).
> While this is fine in most cases, it does not quite serve our use case for 
> metrics. 
> So we need to decide how are we going to encode and decode metric values and 
> store them in HBase.

This message was sent by Atlassian JIRA

Reply via email to