You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Rekha Joshi (JIRA)" <ji...@apache.org> on 2014/05/04 13:21:15 UTC
[jira] [Assigned] (HBASE-11107) Provide utility method equivalent
to 0.92's Result.getBytes().getSize()
[ https://issues.apache.org/jira/browse/HBASE-11107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rekha Joshi reassigned HBASE-11107:
-----------------------------------
Assignee: Rekha Joshi
> Provide utility method equivalent to 0.92's Result.getBytes().getSize()
> -----------------------------------------------------------------------
>
> Key: HBASE-11107
> URL: https://issues.apache.org/jira/browse/HBASE-11107
> Project: HBase
> Issue Type: Task
> Reporter: Ted Yu
> Assignee: Rekha Joshi
> Priority: Trivial
>
> Currently user has to write code similar to the following for replacement of Result.getBytes().getSize() :
> {code}
> + Cell[] cellValues = resultRow.rawCells();
> +
> + long size = 0L;
> + if (null != cellValues) {
> + for (Cell cellValue : cellValues) {
> + size += KeyValueUtil.ensureKeyValue(cellValue).heapSize();
> + }
> + }
> {code}
> In ClientScanner, we have:
> {code}
> for (Cell kv : rs.rawCells()) {
> // TODO make method in Cell or CellUtil
> remainingResultSize -= KeyValueUtil.ensureKeyValue(kv).heapSize();
> }
> {code}
> A utility method should be provided which computes summation of Cell sizes in a Result.
--
This message was sent by Atlassian JIRA
(v6.2#6252)