[ 
https://issues.apache.org/jira/browse/YARN-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14660923#comment-14660923
 ] 

Vrushali C commented on YARN-3049:
----------------------------------

It looks like the conversion back to String was done to  avoid additional API 
on store. But if this is causing issues with a long value being the column 
qualifier, I think we should modify/add to the store api to include one which 
accepts a byte array for the compoundColumnQualifier. 

Specifically I think this code should be changed to avoid unnecessary 
conversions between longs to bytes to strings. I thought about changing this in 
my earlier patch but did not think it was causing issues, hence kept it the way 
it was. 

{code}
  byte[] compoundColumnQualifierBytes =
                    Separator.VALUES.join(columnQualifierWithTsBytes,
                        Bytes.toBytes(info.getKey()));
                // convert back to string to avoid additional API on store.
                String compoundColumnQualifier =
                    Bytes.toString(compoundColumnQualifierBytes);
                EntityColumnPrefix.EVENT.store(rowKey, entityTable,
                    compoundColumnQualifier, null, info.getValue());

{code} 


Also, to [~gtCarrera]'s point, we should provide an additional api for 
getColumnQualifier which accepts a  pre-encoded byte array. It will be in 
addition to the existing api which accepts a String, so that we can use either 
one as applicable. What do you think [~gtCarrera]



> [Storage Implementation] Implement storage reader interface to fetch raw data 
> from HBase backend
> ------------------------------------------------------------------------------------------------
>
>                 Key: YARN-3049
>                 URL: https://issues.apache.org/jira/browse/YARN-3049
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: timelineserver
>            Reporter: Sangjin Lee
>            Assignee: Zhijie Shen
>         Attachments: YARN-3049-WIP.1.patch, YARN-3049-WIP.2.patch, 
> YARN-3049-WIP.3.patch, YARN-3049-YARN-2928.2.patch, 
> YARN-3049-YARN-2928.3.patch, YARN-3049-YARN-2928.4.patch, 
> YARN-3049-YARN-2928.5.patch, YARN-3049-YARN-2928.6.patch, 
> YARN-3049-YARN-2928.7.patch
>
>
> Implement existing ATS queries with the new ATS reader design.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to