hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars George (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-13030) [1.0.0 polish] Make ScanMetrics public again and align Put 'add' with Get, Delete, etc., addColumn
Date Thu, 12 Feb 2015 21:25:12 GMT

    [ https://issues.apache.org/jira/browse/HBASE-13030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14319004#comment-14319004

Lars George commented on HBASE-13030:

[~enis] Hah, yeah, that is the comment I stumbled across. I was wondering the same. That whole
setAttribute()/getAttribute() is just too weird. And yes, getMetrics() should be coming back
from the ResultScanner, that is what I was hoping for to. 

Ah, a few more things I did ask:
- Missing CellUtil.fillValueRange()
I am not sure why this is missing, but it makes accessing values awkward. The main issue is
the next:
- Result.getValue() always copies data
The example we give is often "result.getValue(fam, qual)" but in a high performance app this
is bad form, as it copies data. The only way to access data is "Bytes.toXYZ(cell.getValueArray(),
cell.getValueOffset(), cell.getValueLength())" which is where the above fillValueRange() might
help a bit.
Ideally though we had a way to access the raw data - without the offset/length business -
if needed without going through hoops
- Result.getValueAsByteBuffer() returns a mutable reference to the underlaying array
This is even weirder I think, the ByteBuffer should be returned as a readonly version, no?
Since we copy in getValue() to need bleed a reference, and with the ByteBuffer we do?

I am still going through the entire client API, I will report if I find something else. I
know, it might be too late by then, but oh well, what else can be done.

> [1.0.0 polish] Make ScanMetrics public again and align Put 'add' with Get, Delete, etc.,
> --------------------------------------------------------------------------------------------------
>                 Key: HBASE-13030
>                 URL: https://issues.apache.org/jira/browse/HBASE-13030
>             Project: HBase
>          Issue Type: Bug
>          Components: Operability
>    Affects Versions: 1.0.0
>            Reporter: stack
>            Assignee: stack
>             Fix For: 1.0.0, 2.0.0, 1.1.0
>         Attachments: 13030.txt
> These are some of the items raised by [~larsgeorge] looking at our API for first time
in a long time trying to update examples in the HBase Book.
> 1. ScanMetrics used to be available with some gymnastics in old days. Now it is IA.private
and to get at it from Scan context, you need to use private ProtobufUtils. This seems like
useful advanced user utility that should not be shut down.
> 2. Put is not like the others around the addColumn usage. Fix.
> [~enis] Hopefully these ok to go in (the Scan class addition is a little ugly but didn't
want to do anything more adventurous this late in the game).

This message was sent by Atlassian JIRA

View raw message