hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gustavo Anatoly (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-11107) Provide utility method equivalent to 0.92's Result.getBytes().getSize()
Date Thu, 12 Jun 2014 21:49:02 GMT

     [ https://issues.apache.org/jira/browse/HBASE-11107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gustavo Anatoly updated HBASE-11107:
------------------------------------

    Attachment: HBASE-11107.patch

> 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: Gustavo Anatoly
>            Priority: Trivial
>         Attachments: HBASE-11107.patch
>
>
> 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)

Mime
View raw message